Marvin Blackburn <[EMAIL PROTECTED]> writes: > I need a method for automatically generating a crypt(3) password so I can > input it into the > usermod -p command to force a user to enter a new password when logging in. > > I saw a way to use python to generate the key, but its not automatated. > > Any help would be appreciated. > I am running RHEL ES2.1
For md5 passwords (almost certainly what you always want for user accounts): openssl passwd -1 For true old fashioned, insecure crypt passwords that you almost never should use unless you really really know why you need them: openssl passwd -crypt Both will prompt you for the password twice, compute a random salt, and spit out the encrypted password. Check 'man sslpasswd' for details. Chip -- Chip Turner [EMAIL PROTECTED] -- TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ : http://trilug.org/faq/ TriLUG Member Services FAQ : http://members.trilug.org/services_faq/ TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
