#! /usr/bin/perl # # Generate a passwd which can be used for the UsrPwd authentication method. # Store the passwd in ~/.rootdpass. # srand(time()); my $randletter = "(int (rand(26)) + (int (rand(1) + .5) % 2 ? 65 : 97))"; my $salt = sprintf("%c%c", eval $randletter, eval $randletter); my $plaintext = shift; my $crypttext = crypt($plaintext, $salt); print "${crypttext}\n";