LFCS · Question #240
The files in the /etc/skel directory are used by the:
The correct answer is C. useradd command. The /etc/skel directory contains a default set of files and directories that are copied into a new user's home directory during account creation.
Question
Options
- Apwconv command
- Bpwunconv command
- Cuseradd command
- Dpasswd command
How the community answered
(50 responses)- A6% (3)
- B2% (1)
- C90% (45)
- D2% (1)
Why each option
The `/etc/skel` directory contains a default set of files and directories that are copied into a new user's home directory during account creation.
The `pwconv` command is used to convert shadow password and group files from regular password and group files, not for user creation.
The `pwunconv` command reverts `pwconv`, converting shadow password and group files back to regular password and group files.
The `useradd` command, when creating a new user account, copies the contents of the `/etc/skel` directory into the newly created user's home directory. This process populates the new user's home with default configuration files and directories, such as `.bashrc` or `.profile`.
The `passwd` command is used for changing a user's password, not for creating new user accounts or populating home directories.
Concept tested: `useradd` and `/etc/skel` directory
Source: https://man7.org/linux/man-pages/man8/useradd.8.html
Topics
Community Discussion
No community discussion yet for this question.