LinuxQuestions.org
Register a domain and help support LQ
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 07-28-2011, 08:28 PM   #1
greenpool
Member
 
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
Code:
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
Code:
grep test /etc/passwd
which returns:

'test:x:1001:1001::/home/test:/bin/sh'

which i believe means it is meant to exist.

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

thanks!


Addendum:

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
rahulkya
Member
 
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

Quote:
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
rahulkya
Member
 
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"

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

Rep: Reputation: 1438Reputation: 1438Reputation: 1438Reputation: 1438Reputation: 1438Reputation: 1438Reputation: 1438Reputation: 1438Reputation: 1438Reputation: 1438
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:

Code:
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

(snip)

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

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
@frankbell

"adduser" and "useradd" are different commands.
 
  


Reply

Tags
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


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 01:58 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration