in reply to Re: Shadow Passwords
in thread Shadow Passwords

is it possible to do this then:
my $epassword = `openssl passwd -apr1 -salt '$1' '$password'`; !system ('useradd', '-g', 'users', '-d', "/home/$username", '-p', $epassword, '-s', '/bin/false', '-c', $fullname, $username) or die "Creation of User Failed";

Replies are listed 'Best First'.
Re: Re: Re: Shadow Passwords
by fokat (Deacon) on May 03, 2003 at 18:05 UTC

    I would seriously consider Util's (++) suggestion about using Expect. His point about PAM and hashing algorythm is worthy of examination, IMHO. This also makes the solution more portable, as generally passwd has a very similar behavior among systems. This is not true for useradd or adduser.

    Best regards

    -lem, but some call me fokat