Home Generate SHA512 password with CentOS 7,FEDORA 7, RHEL 7
Post
Cancel

Generate SHA512 password with CentOS 7,FEDORA 7, RHEL 7

If you need to generate a SHA512 encrypted password for kickstart or perhaps for bootstrapping you servers with automation tools like ansible you can do this easily with python.

python -c 'import crypt,getpass; print(crypt.crypt(getpass.getpass(), crypt.mksalt(crypt.METHOD_SHA512)))'

If you have python below version 2.7 the you should use this command:

python -c 'import crypt; print crypt.crypt("YOURPasswordGoesHEr3", "$6$saltsalt$")'

 

This post is licensed under CC BY 4.0 by the author.