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.
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.
According to useradd -D
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
GROUPS=video,dialout
CREATE_MAIL_SPOOL=no
SKEL= [path] is your skeleton directory.
mkdir /etc/skel/blahblah
– thrig May 26 '16 at 16:18