Linux passwords in /etc/shadow
Hello All,
Can someone please give me any insight on how the passwords in /etc/shadow are encrypted? I am attempting to develop a script that will update /etc/shadow with a new user password, but I don't know how the passwords are encrypted/hashed. Also, is there a way to run /usr/bin/passwd so the password is updated automatically? (That way, I won't have to deal with /etc/shadow at all) For example: Code:
passwd username newpass Code:
passwd username Is there a way to run passwd --stdin username and then send the new password to passwd through a script? Thanks in advance. |
Hi,
I'm not used to deal with passwords, but it seems that they are encrypted using the crypt() function (see crypt(3) manual page), wich implements the DES algorithm. I don't know what do you mean with: Quote:
|
Quote:
What distro are you using? I'm running FC3. Check http://unixhelp.ed.ac.uk/CGI/man-cgi?passwd for more info... it includes the --stdin thing. |
I'm using Debian SID, and I'm almost sure that the man page of passwd of my distribution doesn't say a word about the --stdin option.
|
Quote:
|
All times are GMT -5. The time now is 01:44 PM. |