Created
March 18, 2015 01:53
-
-
Save lcerezo/2e9825e0ea813879d726 to your computer and use it in GitHub Desktop.
python method to create sha512 hash suitable for /etc/shadow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hostname[~]$ python | |
Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32) | |
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import crypt | |
>>> print crypt.crypt('My Magical passW0Rd!!',crypt.mksalt(crypt.METHOD_SHA512)) | |
$6$zyMqrghWfTymk7Ya$vACFM/VMV8Dc3OyPMIsGD83GY54/wXhBezRJgoWhN1kez7b5NDuNAGE1EUtOrtlNFR4GoYFnDh8cEWjYm1okl. | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment