Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-04-2007, 04:31 PM   #1
LQ Newbie
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
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.
Old 10-04-2007, 05:12 PM   #2
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
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.
Old 10-04-2007, 05:17 PM   #3
Registered: May 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 448

Rep: Reputation: 38
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...


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

Last edited by MoonMind; 10-04-2007 at 05:20 PM.
Old 10-04-2007, 11:06 PM   #4
Registered: Jul 2003
Location: Pennsylvainia
Distribution: Slackware / Debian / *Ubuntu / Opensuse / Solaris uname: Brian Cooney
Posts: 503

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

instead of doing:

useradd <username>


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

Last edited by Kahless; 10-04-2007 at 11:07 PM.
Old 10-05-2007, 01:11 PM   #5
LQ Newbie
Registered: Oct 2007
Posts: 2

Original Poster
Rep: Reputation: 0
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I set the permission on the home directory when creating an user crisostomo_enrico Solaris / OpenSolaris 4 09-26-2007 07:24 PM
Problem creating a home directory for users Ruffian2001 Fedora 3 04-28-2007 06:21 PM
creating home directory jitheshmurali Linux - Networking 2 04-24-2006 07:03 AM
what is the meaninig of Automatically mount home directory in creating users options SAMASTAR Solaris / OpenSolaris 2 04-16-2006 09:44 PM
Creating new user gives empty /home directory rkfb Slackware 8 12-28-2005 12:17 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration