You want to add a README.txt file in the home directory of every new user that you create
by using the useradd command on your Oracle Linux system. In which directory will you
place the README.txt file so that it automatically gets copied to the new user’s home
directory when the user is created?
A.
/home/users
B.
/etc/default/useradd
C.
/etc/default
D.
/etc/skel
the answer seems to be D (even though C also looks correct, apparently D is the default)
Explanation:
-k, –skel SKEL_DIR
The skeleton directory, which contains files and directories to be copied in the user’s home
directory, when the home directory is created by useradd.
This option is only valid if the -m (or –create-home) option is specified.
If this option is not set, the skeleton directory is defined by the SKEL variable in
/etc/default/useradd or, by default, /etc/skel.
Note:
*useradd – create a new user or update default new user information
Reference: man useradd
D