~cypheon/pkgsrc-wip

pkgsrc-wip/postoffice/files/pop_passwd.pl -rw-r--r-- 276 bytes
5f1bf4f5 — Johann Rudloff Subst PLIST paths for platform specific files for other architectures 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
#!/usr/pkg/bin/perl
# pop_passwd username password >> password file

 $name = $ARGV[0];

 @salt_chars         = ('a'..'z','A'..'Z','0'..'9');
 $salt               = $salt_chars[rand(62)] . $salt_chars[rand(62)];

 $passwd = crypt ($ARGV[1], $salt);

 print "$name:$passwd\n";