On Linux systems, in which directory are the default skeleton files stored that are copied into a new user's home directory at account creation time?

Difficulty: Easy

Correct Answer: /etc/skel

Explanation:


Introduction / Context:
When a new user is created, many distributions copy a set of default files (such as shell startup files) into the user's home directory. These defaults define the initial environment and can be customized by administrators to enforce organizational standards.


Given Data / Assumptions:

  • We are using standard useradd/adduser tools.
  • We want to know where the default template files are stored.
  • Defaults include files like .bashrc, .profile, .bash_logout, etc.


Concept / Approach:

The /etc/skel directory holds skeleton files. When creating users with useradd -m or adduser, contents of /etc/skel are copied into the new home directory. Administrators can add common configuration files or directories here to standardize new accounts.


Step-by-Step Solution:

Inspect skeleton: ls -la /etc/skelCreate user: sudo useradd -m amitVerify: ls -la /home/amit shows files seeded from /etc/skelCustomize: edit /etc/skel/.bashrc to adjust defaults for future users


Verification / Alternative check:

See /etc/default/useradd or distro docs for useradd's default SKEL path. On Debian-family, adduser uses /etc/skel by default as well.


Why Other Options Are Wrong:

  • /usr/tmp: temporary files, not skeleton defaults.
  • /etc/default: holds default configuration files for services, not home templates.
  • /etc/users: not a standard directory for skeleton files.
  • None: incorrect because /etc/skel is correct.


Common Pitfalls:

  • Editing /etc/skel after user creation—existing users won't be updated automatically.
  • Forgetting -m with useradd to create the home directory.


Final Answer:

/etc/skel.

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion