View previous topic :: View next topic |
Author |
Message |
blarson n00b
Joined: 22 Jul 2002 Posts: 22
|
Posted: Thu Jan 30, 2003 8:22 pm Post subject: /etc/shadow is foobar |
|
|
So I was adding a few users yesterday with useradd... I think I used the -p flag to give them a default password.
Someone complains that they can't log on, so I try my user account, and it can't log on either. Root is still ok (phew!) so I go in and look at /etc/passwd... looks good. /etc/shadow: all the users have their password set to the default password, not encrypted at all. WHAT DID I DO?!?
any reason why useradd would change the password for all users? Maybe I should just add users by hand from now on. |
|
Back to top |
|
|
DeKoder n00b
Joined: 10 Aug 2002 Posts: 17
|
Posted: Fri Jan 31, 2003 12:22 am Post subject: |
|
|
you did a "-p cleartextpassword" :P the -p switch on "useradd" is followed by the *hashed* password, not a clear text one...which made its way into /etc/shadow when that file is supposed to contain the hashed passwords :)
So, i recommend you to useradd without the -p switch, and then do a `passwd username.just.created` and set the password! Or you could also use the output of crypt() function on a C program or perl script...it's up to you!
Cyaz
DeKoder |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|