Re: encrypting passwords for rootpw

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

 



On Fri, 10 Jan 2003, 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?

Use the --iscrypted option to rootpw, and generate the password with
this script:

----- CUT HERE -----
!/usr/bin/perl -w

$passwd = $ARGV[0];
$salt = "\$1\$".$ARGV[1]."\$";

print(crypt($passwd, $salt)."\n");
----- CUT HERE ----

e.g.
$ md5crypt.pl Sekret! ABCDEFGH
$1$ABCDEFGH$tAFdeA3F3BJcza9M7wDZV/


THIS IS A BADLY WRITTEN SCRIPT. It gets the job done, but you must be
careful to generate the random salt properly, take care to prevent other
users seeing the plaintext password in the output of ps, and take care
to prevent the passwords you use ending up in shell history files. I
might write a better version and post it later.

I assume you are using "auth --enablemd5" in your kickstart file (you
should be).


Cheers,

Phil





[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