Re: encrypting passwords for rootpw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2003-01-10 at 12:19, McCanta, Jay wrote:
>  
> We build ks.cfg files on the fly, generate a floppy and hand that off for
> installation.  How can I generate the encrypted password for the rootpw
> option?  I don't want to put the plain text version in the floppy because
> the people doing the install should not have the root password.  Different
> systems have different root passwords and I want to generate it as we build
> the ks.cfg.
>  
You can generate the encrypted passwords pretty easily with perl:

perl -e 'print crypt("password","salt")."\n";'

replace 'password' with the word you want to encrypt, and 'salt' with a
random salt string.

For DES style passwords, salt should be any two characters:
perl -e 'print crypt("mySecretPassword","XR")."\n";'

For MD5 passwords, you use the format '$1$salt' where the '$1$' is
literal, and the salt is up to 8 characters:
perl -e 'print crypt("mySecretPassword","$1$ABCDEFGH")."\n";'

-- 
Jason Kohles                                 jkohles@xxxxxxxxxx
Senior Engineer                 Red Hat Professional Consulting





[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux