Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 11-14-2006, 06:44 AM   #1
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 :

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
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
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

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


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 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 > Forums > Linux Forums > Linux - General

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