Re: useradd mit passwort
On Tuesday 21 March 2006 16:34, Roland M. Kruggel wrote:
> Wie sieht dieses Passwort aus? Wo bekomme ich crypt her? MAn crypt
> bezieht sich nur auf eine C library Funktion mit dem hinweis das sie
> nicht exportiert werden darf.
#!/usr/bin/perl
use strict;
use warnings;
my $crypt = $ARGV[0];
print $crypt."\n";
sub create_passwd {
my $crypt = crypt(shift,salt());
return ($crypt, $passwd);
}
sub salt {
return $string0[rand $length0].$string0[rand $length0];
}
Gruß
Marc
--
"When the going gets tough, the tough get empirical."
-- Jon Carroll
Reply to: