Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-23-2003, 01:12 PM   #1
LQ Newbie
Registered: Dec 2002
Posts: 28

Rep: Reputation: 15
Adding a new user

I'm trying to add a new user to my system (Distro Redhat 8.0). I do something like the following in bash:
useradd -p test -g nobody Newusername

New username gets added into /etc/passwd, however the password in /etc/shadow appears as "test" instead of being encrypted. And I can't login using that name. Can someone tell me what I'm doing wrong? Do I have to encrypt the password myself first? I tried checking out the "crypt" command but apparently it doesn't exist on my system.

Thanks ahead.
Old 01-23-2003, 02:06 PM   #2
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Rep: Reputation: 30
Just a random guess - you could try using adduser instead of useradd
make sure you remove any existing entries in /etc/passwd and /etc/shadow for the users you are adding.

Old 01-23-2003, 04:19 PM   #3
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Usually assigning the password is a seperate step. Use the passwd command:
passwd newusername
then it will prompt you for the password, then prompt again. That's it.
Old 01-23-2003, 07:17 PM   #4
LQ Newbie
Registered: Dec 2002
Posts: 24

Rep: Reputation: 15
Don't specify the password when adding the user with the -p switch in useradd, chances are the password won't work anyway.

Add the user as normal without the -p flag and then set the password manually using: passwd <username>


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
adding user hoopy Linux - General 3 09-13-2005 09:38 PM
adding a new user Cinematography MEPIS 5 07-25-2005 09:19 PM
adding a user trey31357 Slackware 8 06-09-2005 07:54 PM
Adding second user jnhannah Linux - Security 1 06-27-2004 02:50 PM
user adding sathu Linux - Newbie 1 02-12-2002 05:19 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:44 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration