Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automated useradd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
AimarPL
n00b
n00b


Joined: 25 Oct 2008
Posts: 9
Location: .pl

PostPosted: Sun Mar 22, 2009 5:13 pm    Post subject: Automated useradd Reply with quote

Hi ya,
I have lil trouble with user adding scheme... seems like it's not working correctly :/

For example if i type "useradd whoever" i want it to create homedir in /home/whoever + chown it for this user + add some files inside it...

As i found out, /etc/skel and /etc/default/useradd is responsible for that, so here it goes:

Quote:
aimar # cat useradd
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=7
EXPIRE=
SHELL=/bin/false
SKEL=/etc/skel
CREATE_MAIL_SPOOL=no


aimar # ls -la /etc/skel/
Quote:
drwxr-xr-x 6 root root 4096 mar 16 19:18 .
drwxr-xr-x 54 root root 4096 mar 22 16:01 ..
-rw-r--r-- 1 root root 127 kwi 12 2008 .bash_logout
-rw-r--r-- 1 root root 193 kwi 12 2008 .bash_profile
-rw-r--r-- 1 root root 551 kwi 12 2008 .bashrc
drwxr-xr-x 2 root root 4096 cze 2 2006 cgi-bin
drwx------ 5 root root 4096 mar 16 19:18 .maildir
-rw-r--r-- 1 root root 82 mar 16 19:18 .qmail.sample
drwx------ 2 root root 4096 lut 26 2008 .ssh
drwxr-xr-x 2 root root 4096 cze 2 2006 www


Is anything wrong with it? cuz i can't see any new dir in /home/ after i add any new user...

How do i fix it?
Thanks in advance :)

Cheers,
Aimar
Back to top
View user's profile Send private message
nothingnew
n00b
n00b


Joined: 26 Jun 2008
Posts: 10

PostPosted: Sun Mar 22, 2009 10:08 pm    Post subject: Reply with quote

from the useradd manpage:
Quote:

-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.

By default, no home directories are created.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum