[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: encrypting passwords for rootpw
- From: Chip Turner <cturner redhat com>
- To: kickstart-list redhat com
- Subject: Re: encrypting passwords for rootpw
- Date: 10 Jan 2003 14:06:51 -0500
Jason Kohles <jkohles redhat com> writes:
> 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";'
Careful, you'll get $ expansion using $ inside a double-quoted
string. Better is this:
perl -e 'print crypt(q{mySecretPassword},q{$1$ABCDEFGH})."\n";'
Chip
--
Chip Turner cturner redhat com
Red Hat, Inc.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]