XK0-005 · Question #796
An application requires a configuration file be placed in each user's home directory when an account is created. In which of the following locations should the administrator place the configuration…
The correct answer is A. /etc/skel. To ensure that new user accounts receive a specific configuration file in their home directory upon creation, the administrator should place that file in the /etc/skel directory. Files in /etc/skel are automatically copied to a new user's home directory when the useradd command…
Question
An application requires a configuration file be placed in each user's home directory when an account is created. In which of the following locations should the administrator place the configuration file?
Options
- A/etc/skel
- B/etc/sysconfig
- C/etc/ssh
- D/etc/rc.local
How the community answered
(21 responses)- A90% (19)
- B5% (1)
- C5% (1)
Why each option
To ensure that new user accounts receive a specific configuration file in their home directory upon creation, the administrator should place that file in the `/etc/skel` directory. Files in `/etc/skel` are automatically copied to a new user's home directory when the `useradd` command is executed.
The `/etc/skel` directory (short for "skeleton") contains files and directories that are automatically copied into a new user's home directory when that user account is created by utilities like `useradd`. By placing the application's configuration file in `/etc/skel`, every new user will automatically have a copy of that file in their home directory, fulfilling the application's requirement.
`/etc/sysconfig` typically stores configuration files for system services and network settings, not template files for user home directories.
`/etc/ssh` contains configuration files for the SSH daemon and client, specific to SSH services, not for general user account setup.
`/etc/rc.local` is a legacy script executed at the end of the boot process; it's not used for templating new user home directories.
Concept tested: Linux user management, useradd, /etc/skel directory
Source: https://man7.org/linux/man-pages/man8/useradd.8.html
Topics
Community Discussion
No community discussion yet for this question.