nerdexam
CompTIA

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…

System Management

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)
  • A
    90% (19)
  • B
    5% (1)
  • C
    5% (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.

A/etc/skelCorrect

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.

B/etc/sysconfig

`/etc/sysconfig` typically stores configuration files for system services and network settings, not template files for user home directories.

C/etc/ssh

`/etc/ssh` contains configuration files for the SSH daemon and client, specific to SSH services, not for general user account setup.

D/etc/rc.local

`/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

#User Management#File System Hierarchy Standard#Configuration Files#Account Creation

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice