View previous topic :: View next topic |
Author |
Message |
AimarPL n00b
Joined: 25 Oct 2008 Posts: 9 Location: .pl
|
Posted: Sun Mar 22, 2009 5:13 pm Post subject: Automated useradd |
|
|
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 |
|
|
nothingnew n00b
Joined: 26 Jun 2008 Posts: 10
|
Posted: Sun Mar 22, 2009 10:08 pm Post subject: |
|
|
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 |
|
|
|
|
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
|
|