Download your favorite Linux distribution at LQ ISO.
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!


LinkBack Search this Thread
Old 07-28-2011, 08:28 PM   #1
Registered: Sep 2010
Posts: 41

Rep: Reputation: 0
Ubuntu new user: cannot see new user in home directory

Hi guys,

i'm new to linux and just installed Ubuntu and decided to play around with it.

i just executed
useradd test
which supposedly creates a folder in the home directory '/home/test' but when i look in there i can't see it

i also did a
grep test /etc/passwd
which returns:


which i believe means it is meant to exist.

i'm really confused now..any help guys?



I have also now noticed that when i log in and log back in i have the option to login as 'test' but it prompts me for a password which i did not set :s

Last edited by greenpool; 07-28-2011 at 08:43 PM. Reason: corrected command for new user
Old 07-28-2011, 08:36 PM   #2
Registered: Feb 2009
Location: New Delhi
Distribution: Linux mint,Ubuntu,Debian,RHEL 5,slackware 13.1, free BSD,solaris.
Posts: 186
Blog Entries: 3

Rep: Reputation: 33
the problem is- by default adduser doesn't create home directory use this command with -m option

useradd -m test
use a different username than test as it already exists
1 members found this post helpful.
Old 07-28-2011, 08:41 PM   #3
Registered: Feb 2009
Location: New Delhi
Distribution: Linux mint,Ubuntu,Debian,RHEL 5,slackware 13.1, free BSD,solaris.
Posts: 186
Blog Entries: 3

Rep: Reputation: 33
one thing- to learn linux use manuals of the command and the command is called -"man"

man commandname
this will show you command's usage in detail....
have fun with ubuntu/linux
Old 07-28-2011, 09:25 PM   #4
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, Mint
Posts: 6,891

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
When I first read greenpool's post, I tested it out on my Ubuntu box and ran "adduser test," then answered the questions to create a password. It did create a /home/test directory.

I know that different distros implement adduser differently (in CentOS, it simply creates the user; you have to run "passwd [username]" to create the password).

Just did it again:

root@[computername]:/home/[username]# adduser test
Adding user `test' ...
Adding new group `test' (1000) ...
Adding new user `test' (1000) with group `test' ...
Creating home directory `/home/test' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for test
Enter the new value, or press ENTER for the default


Is the information correct? [Y/n] 
root@[computername]:/home/[username]# ls /home
frankbell  test
root@[computername]:/home/[username]# ls /home/test
Old 07-29-2011, 08:10 AM   #5
LQ 5k Club
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713

"adduser" and "useradd" are different commands.


adduser, home directory, ubuntu.

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
create user without creating user home directory aksharb Linux - Software 1 05-12-2011 04:21 PM
changing home directory permission in user management after user created in suse(KDE) hamedhsn Linux - Security 4 04-06-2011 09:18 PM
user's home directory on NFS server--what happens when user logs in from 2 computers? Mountain Linux - Networking 1 03-18-2009 03:35 PM
jail user to /home/user directory confused_user Linux - Security 12 03-15-2006 09:56 AM

All times are GMT -5. The time now is 11:49 AM.

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 @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration