ATOTCLIC Linux Generate encrypted passwords Python

Generate encrypted passwords Python

>>> import crypt
>>> prefix = '$6$'
>>> salt = 'saltsalt'
>>> password = 'password'
>>> crypt.crypt(password, prefix + salt)
'$6$saltsalt$qFmFH.bQmmtXzyBY0s9v7Oicd2z4XSIecDzlB5KiA2/jctKu9YterLp8wwnSq.qc.eoxqOmSuNp2xS0ktL3nh/'
python -c 'import crypt; print crypt.crypt("password", "$6$saltsalt$")'
$6$saltsalt$qFmFH.bQmmtXzyBY0s9v7Oicd2z4XSIecDzlB5KiA2/jctKu9YterLp8wwnSq.qc.eoxqOmSuNp2xS0ktL3nh/
mkpasswd -m sha-512 -S saltsalt password
$6$saltsalt$qFmFH.bQmmtXzyBY0s9v7Oicd2z4XSIecDzlB5KiA2/jctKu9YterLp8wwnSq.qc.eoxqOmSuNp2xS0ktL3nh/

Related Post