LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Useradd not creating home directory when creating newuser (https://www.linuxquestions.org/questions/linux-newbie-8/useradd-not-creating-home-directory-when-creating-newuser-589476/)

meneedham 10-04-2007 03:31 PM

Useradd not creating home directory when creating newuser
 
When we are using useradd to create new user accounts in Ubuntu we are not getting a home directory created at time of creation or the home directory is not accessible.

Any help would be really appreciated.

Dinithion 10-04-2007 04:12 PM

With useradd you have to manualy enter the home directory to be created. If none is specified, none is created. Read 'man useradd' for more information.
Try using adduser. It's a bit more user friendly, sudo adduser <username>. That automaticly adds directory and ask you for password, realname etc.

MoonMind 10-04-2007 04:17 PM

Could you describe your exact procedure in more detail? It's not too hard to correct the problems you're reporting, but maybe there's something even easier to correct...

M.

Edit:
Okay, Dinithion's tip's doing the trick anyway, so there's no need for a follow-up - well, if it works, anyway... (I hope there's nothing else going wrong).

Kahless 10-04-2007 10:06 PM

if you give the -m flag, useradd will take care of creating the home directory for you.

instead of doing:

useradd <username>

do


useradd -m <username>



Btw... if you want to deleate a user (say, to try again) just deleate their entire line form /etc/passwd and /etc/shadow


Good luck :)



For more detail, see


man useradd

meneedham 10-05-2007 12:11 PM

Thanks for the ideas I will get on them in the AM
 
I will have several more questions later I am sure. You folks are great. I will let you know how it goes.


All times are GMT -5. The time now is 07:28 AM.