in reply to Re: Passwords on unix
in thread Passwords on unix

That approach is going to fail on any system that uses shadow password files. Many modern Unices use shadow password files.

Abigail

Replies are listed 'Best First'.
Re: Re: Passwords on unix
by fokat (Deacon) on Feb 04, 2003 at 21:54 UTC

    Abiigail-II said::

    That approach is going to fail on any system that uses shadow password files.

    I don't know why. getpwent() and friends do the right thing even in systems with shadow passwords, provided you are superuser.

    Perl's crypt() will call whatever crypt() is there in the system's library. Crypt::Passwd and Crypt::PasswdMD5 will cover the gap if you want to use a file from a different (incompatible) crypted password, but this is not the case at hand..

    Best regards

    -lem, but some call me fokat