Shadow passwords

[email protected] ("Daniel Falkenberg") Thu, 1 Nov 2001 09:57:41 +1030
Newsgroups perl.crypto
Message-ID <[email protected]>
Hey all,

Just wondering what the best way to find out what encryption I am
running on my Unix maxchine. Basically I have a problem where I need to
add a user from a Perl script something similar to the following...

use Crypt::PasswdMD5;

my $salt;
$password =3D "password";
$cryptedpassword =3D unix_md5_crypt($password, $salt);
system("/usr/sbin/adduser <username> -g 45 -p $cryptedpassword -c
'<Comment>' -s /bin/false");

This way (hopefully) I don't have to change the password manually with
passwd.  But the problem I am facing is... when I went to test the
accout it still didn't accept the password.  So I changed the password
using passwd and that worked fine. =20

Any one have any ideas how I could either find out what encryption I am
using or how I would go about this?

Regards,

Dan=20