Skeleton directory - how to add my own directories
18,134
As thrig pointed out, all that's needed is to create the directory structure that you want under /etc/skel
.
Quoting from the useradd man page
-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.
... and the default SKEL variable in /etc/default/useradd is /etc/skel.
Related videos on Youtube
Author by
Zawada
Updated on September 18, 2022Comments
-
Zawada almost 2 years
I want to add a few directories to the skeleton directory. When I add new user I want to add my own directories to the new home directories.
-
thrig about 8 years
mkdir /etc/skel/blahblah
-