sub CryptPasswd { my ($username, $passwd, $salt) = @_; $salt ||= 'anystring'; # only first 2 chars will be used return crypt ($passwd, $salt); }