LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-04-2007, 03:31 PM   #1
meneedham
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, 04:12 PM   #2
Dinithion
Member
 
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, 04:17 PM   #3
MoonMind
Member
 
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...

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

Last edited by MoonMind; 10-04-2007 at 04:20 PM.
 
Old 10-04-2007, 10:06 PM   #4
Kahless
Member
 
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>

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

Last edited by Kahless; 10-04-2007 at 10:07 PM.
 
Old 10-05-2007, 12:11 PM   #5
meneedham
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.
 
  


Reply



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 06:24 PM
Problem creating a home directory for users Ruffian2001 Fedora 3 04-28-2007 05:21 PM
creating home directory jitheshmurali Linux - Networking 2 04-24-2006 06:03 AM
what is the meaninig of Automatically mount home directory in creating users options SAMASTAR Solaris / OpenSolaris 2 04-16-2006 08:44 PM
Creating new user gives empty /home directory rkfb Slackware 8 12-28-2005 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:01 PM.

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