Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/shadow is foobar
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
blarson
n00b
n00b


Joined: 22 Jul 2002
Posts: 22

PostPosted: Thu Jan 30, 2003 8:22 pm    Post subject: /etc/shadow is foobar Reply with quote

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
View user's profile Send private message
DeKoder
n00b
n00b


Joined: 10 Aug 2002
Posts: 17

PostPosted: Fri Jan 31, 2003 12:22 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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