LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-15-2009, 12:04 AM   #1
sheps126
LQ Newbie
 
Registered: Jan 2009
Posts: 13

Rep: Reputation: 0
adduser adds a user but I can't login afterwards


Hi Guys,

This is really frustrating me ... I have read the tutorials and other forum posts, and the man page for adduser, and understand most of it (I hope) but when I create a new user using:

# useradd -gusers -s/bin/bash -pPassword1 -d/home/username -m username

I can't seem to login to that user afterwards. Once logged in as root I can '# su username' (and it doesn't ask me for a password), but when I try to login from the beginning with 'login as: username' it doesn't accept the password.

I am using Fedora 9, any help would much appreciated.

Thanks!
 
Old 01-15-2009, 01:16 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Not sure, but my man page (Slackware 10.1) states:
Code:
-d home_dir
-g initial_group
-p password
which in my opinion implies that there should be spaces between the option and the value.

The examples on http://www.linuxpackages.net/howto/s.../usermgmt.html also uses the spaces.
 
Old 01-15-2009, 01:20 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
i am assuming you are using gnome ??
why not use the gui
System / Administration / Users and Groups
click on the "Add User" button
http://img215.imagevenue.com/img.php..._122_480lo.jpg
and fill in the form
 
Old 01-15-2009, 01:25 AM   #4
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466
Blog Entries: 6

Rep: Reputation: 51
-p <password> has some issue..I guess.
try using passwd <> to issue new password rather than insecure -p option

I tried :
passwd command and it went well

Last edited by your_shadow03; 01-15-2009 at 01:36 AM.
 
Old 01-16-2009, 08:50 AM   #5
sheps126
LQ Newbie
 
Registered: Jan 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks to everyone for their help!

I think Wim had the right idea - I think I needed to use spaces after each switch. Don't know why I didn't think of that?! I also skipped the password switch because it had to be encrypted first and then just set it afterwards. This particular box is constantly in run level 3, it's hosted on a virtual machine and I have no access, thus I added the user through the command line. Personally, even if I could use the GUI, I'd still use the terminal.

Thanks again guys!
 
  


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
adduser, can't login via SSH, now what? Exit99 Linux - Newbie 2 08-10-2008 08:10 PM
Problem re-creating user with adduser Exeunt Slackware 4 04-15-2008 07:37 AM
Adduser with login starting with a number pbjams Linux - Newbie 7 01-30-2008 05:27 PM
How on Sarge to get adduser+locale let new user run a language root & others don't Frommacau Debian 3 06-28-2006 08:11 AM
I have an nfs mounted /home and 'adduser' fails to create a new user dipukm Linux - Software 4 06-01-2004 06:38 PM

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

All times are GMT -5. The time now is 12:32 AM.

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