Welcome to the most active Linux Forum on the web.
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!


  Search this Thread
Old 03-11-2012, 05:51 AM   #1
Registered: Nov 2011
Posts: 66

Rep: Reputation: Disabled
how to Define password while adding a new user !!

Good Day Gents,,

am trying to define a password while creating a user but the user name wont accept the defined password after defining it
bellow are my entries and outputs

[root@rhel5 ~]# useradd -gusers -d /home/moew -m --password abc123 moew

[root@rhel5 ~]# id moew
uid=507(moew) gid=100(users) groups=100(users) context=user_u:system_r:unconfined_t

[root@rhel5 ~]# cat /etc/passwd | grep moew

[root@rhel5 ~]# su - moee
[moee@rhel5 ~]$ su - moew
su: incorrect password

Last edited by 1300; 03-11-2012 at 05:56 AM.
Old 03-11-2012, 06:14 AM   #2
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
This is a common question.

Please see this thread. I provide a number of links at the end of the page.

EDIT: as a short answer to explain your issue, the useradd command expects the argument for the password option to be the encrypted form of the plaintext password--not the plaintext password itself. For your example sequence above to work, when prompted for the password with su, you would need to enter a text string that, when encrypted, matches 'abc123'.

Last edited by Dark_Helmet; 03-12-2012 at 03:29 PM.
Old 03-12-2012, 04:17 AM   #3
Registered: Nov 2011
Posts: 66

Original Poster
Rep: Reputation: Disabled
Thanks alot Dark_Helmet,, your hints was so helpfull

I used this one
adding users and passwords with adduser


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
How to add a rule in user define chain. gardenair Linux - Newbie 3 12-01-2010 11:30 AM
Define java for user allelopath Linux - Software 4 10-21-2006 02:46 PM
Adding user for password folder tommytomato Linux - Security 3 02-24-2004 07:38 AM
define start-bash for user... pablovschby Linux - Software 16 11-13-2003 03:52 PM
ProFTP-adding user and password ? lostboy Linux - General 1 07-04-2003 09:03 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:20 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