LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-14-2006, 06:44 AM   #1
Linuxien
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
useradd command


Dear all,

I've got an issue with the useradd command. Well, I think it isn't really an issue but I need more details on it.
I create two users by two differents ways:
1/ useradd guest -p guest01
Following the man the password should be encrypted.
2/ useradd dave
passwd dave
Then, when I did a more /etc/shadow, I've got the two following lines :
guest:guest01:13466:0:99999:7:::
dave:$1$nPzRX924$WBlu2/2fG4OhAr7zZ.kra/:13466:0:99999:7:::

One seems to be encrypted and the other one not, but following the man and the arguement -p in the command useradd the one that should be encrypted should be guest and not dave, isn't it ?

The man of the argument -p said :
-p, --password PASSWORD
The encrypted password, as returned by crypt(3). The default is to disable the account.

Then, the problem is that I can't log in with the login guest like it was deactivated !!

Can you please help me to describe me what I did wrong and what is the right command to encrypt a pwd and leave it active ?

Many thanks in advance.
 
Old 11-14-2006, 07:12 AM   #2
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
I believe that the -p option expects the encrypted password ... and that it does not take a plain text password and encrypt it.


-p, --password PASSWORD
The encrypted password, as returned by crypt(3). The default is to
disable the account.
 
Old 11-14-2006, 07:32 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quick glance says that "adduser" might be better---eg it prompts you for a password.
Me lazy--always use GUI user manager.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
useradd command Wolvastur Linux - Newbie 9 01-25-2005 10:01 AM
useradd command question hct224 Linux - Newbie 2 06-14-2004 04:47 PM
useradd command johnpayback Linux - General 4 08-13-2002 05:24 PM
useradd command johnpayback Linux - Newbie 5 08-13-2002 10:22 AM
useradd command allancondino Linux - General 5 04-27-2002 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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