LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-11-2012, 04:51 AM   #1
1300
Member
 
Registered: Nov 2011
Posts: 69

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
moew:x:507:100::/home/moew:/bin/bash

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

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

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
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 02:29 PM.
 
Old 03-12-2012, 03:17 AM   #3
1300
Member
 
Registered: Nov 2011
Posts: 69

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

I used this one
adding users and passwords with adduser
http://www.linuxquestions.org/questi...25#post4624525
 
  


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

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

All times are GMT -5. The time now is 01:49 PM.

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