Quantcast
Channel: Why useradd -m doesn't fill created home dir with some defaults? - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 3

Why useradd -m doesn't fill created home dir with some defaults?

$
0
0

My motives:

I want to create deployment script which prepare all system with just 1 click, and although learn Linux this way. So I don't want to use interactive utils like adduser (all interaction info I put in some settings.txt).

My system:

Debian 8.2 (jessie)

I want:

Create user account with home directory and default folders inside. Like adduser do but with useradd.

My problem:

There is paragraph in man userradd:

   -m, --create-home       Create the user's home directory if it does not exist. The files and directories contained in the       skeleton directory (which can be defined with the -k option) will be copied to the home directory.

I looked in /etc/adduser.conf to find the value of SKEL variable for adduser. And it is /etc/skel.

But after I run some useradd -m myuser -k /etc/skel, I've got empty /home/myuser directory.

Update 1

After I created some additional file, it alsought copied to the new user home directory (with 3 hidden files). So it means that /etc/skel doesn't impact on such folders as: Desktop, Downloads, etc. But in this case what does?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images