[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Extract password from /etc/passwd



>How do I 'decrypt' the password in the /etc/passwd file.

You can not. This is a one-way encryption scheme.

If you want to compare a user-supplied password and an entry in 
/etc/passwd, crypt the user-supplied one (using crypt()), then 
compare them.

You might also want to look for PAM and such if you do not want to 
reinvent the wheel.

Fabrice Prémel.