nerdexam
CompTIACompTIA

XK0-005 · Question #796

XK0-005 Question #796: Real Exam Question with Answer & Explanation

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 i

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

Explanation

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.

Common mistakes.

  • B. /etc/sysconfig typically stores configuration files for system services and network settings, not template files for user home directories.
  • C. /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 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

Reference. 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 PracticeBrowse All XK0-005 Questions