LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-31-2012, 06:37 PM   #1
Rogue45
Member
 
Registered: Jun 2012
Posts: 47

Rep: Reputation: Disabled
Is the hash in "rootpw --iscrypted HASH" in Kickstart encrypted with md5?


In kickstart I am generating a hash based on user input of what they want their password to be.

I was using md5 but it doesn't seem to be working for rootpw or user. I tried generating the password with md5sum and grub-md5-crypt

Am i supposed to be using DES or SHA512 or something? The example hash given is like 2x as long as the one i generate with md5.
 
Old 08-01-2012, 12:46 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
The rootpwd --iscrypted and authconfig --enableshadow --passalgo=xyz go together.
Quote:
rootpw

This required command sets the system's root password to the <password> argument.

rootpw [options] <password>

--iscrypted|--plaintext
If this is present, the password argument is assumed to already be encrypted. --plaintext has the opposite effect - the password argument is assumed to not be encrypted. To create an encrypted password you can use python: python -c 'import crypt; print(crypt.crypt("My Password", "$6$My Sault"))' This will generate sha512 crypt of your password using your provided salt.
Quote:
auth or authconfig

This required command sets up the authentication options for the system. This is just a wrapper around the authconfig program, so all options recognized by that program are valid for this command. See the manual page for authconfig for a complete list.

By default, passwords are normally encrypted and are not shadowed.
Something like this should work (using the python command mentioned in the first quote):
Code:
authconfig --enableshadow --passalgo=sha512
rootpw  --iscrypted $<long string>
Quotes are from here: http://fedoraproject.org/wiki/Anaconda/Kickstart
 
2 members found this post helpful.
  


Reply

Tags
kickstart, md5, md5sum, password, script



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl Hashes -- Updating a hash ref via hash value 0.o Programming 5 06-05-2012 12:45 PM
md5 hash files mattydee Linux - Security 3 05-07-2008 06:42 PM
need help unpacking hmac-md5 hash into md5 hash lynx5 Programming 3 02-02-2008 04:06 PM
checking MD5 hash issey Linux - Newbie 4 03-31-2005 01:15 AM
MD5 hash value dominant Linux - Newbie 2 05-07-2004 03:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration