On 21-Dec-08 21:01:57, Chris G wrote:
I have something not right on my xubuntu 8.10 system. When I create new users using 'useradd <username> they are created OK but don't get a home directory. I'm sure the default used to be to create a home directory and to copy its contents from /etc/skel but it's not doing that. If I do 'useradd -m <username>' then I get the files copied from /etc/skel but they don't get executed on logging in to the new account.
Even if I log in to the newly created user and try and execute the files I get a really odd error message:-
$ . .profile .: 13: .profile: not found $
The file .profile does exist:-
$ ls -al total 32 drwxr-xr-x 5 isbd isbd 4096 2008-12-21 20:23 . drwxr-xr-x 10 root root 4096 2008-12-21 20:24 .. -rwxr-xr-x 1 isbd isbd 220 2008-05-12 19:49 .bash_logout -rwxr-xr-x 1 isbd isbd 3115 2008-05-12 19:49 .bashrc drwx------ 5 isbd isbd 4096 2008-12-19 20:13 Mail drwxr-xr-x 2 isbd isbd 4096 2008-12-19 20:11 .mutt drwxr-xr-x 25 isbd users 4096 2008-10-07 19:20 oldIsbd -rwxr-xr-x 1 isbd isbd 675 2008-05-12 19:49 .profile
Erk! What have I done? :-)
Existing users work fine.
-- Chris Green
Have a look at /etc/default/useradd (if it's there ... ) to see what defaults it offers. Also, you might consider using /sbin/adduse instead of useradd -- this is quite a sophisticated script which calls useradd at various points.
Check the options for useradd in 'man useradd'.
Maybe Ubuntu prefers people to use some system admin widget from the graphical menu, and hasn't set up the command-line approach properly.
Good luck! Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 21-Dec-08 Time: 21:24:11 ------------------------------ XFMail ------------------------------