Created
January 2, 2014 16:35
-
-
Save shawnbutts/8221960 to your computer and use it in GitHub Desktop.
python: generate a password hash 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
import crypt | |
plaintext_password = 'txetnialp' | |
salt = crypt.mksalt() | |
shaadow_password = crypt.crypt(plaintext_password, '$6${0}'.format(salt)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment