issue in generating password sha-512 hash for centos

61 views
Skip to first unread message

Suresh P

unread,
Jul 1, 2014, 6:44:17 AM7/1/14
to puppet...@googlegroups.com
Hi, 

user_password="test123"

pass => generate('/bin/sh, '-c', "python -c 'import crypt;print crypt.crypt('$user_password','\$6\$mpouwk')'|tr -d '\n' "),

In above case i'm not able to generate sha-512 password hash.   

Regards,
Suresh

jcbollinger

unread,
Jul 1, 2014, 9:02:28 AM7/1/14
to puppet...@googlegroups.com
Of course not.  The Python crypt module is a wrapper around crypt(3), which is a modified DES algorithm.  If you want SHA-512 then you can get it from the hashlib module, among other places.


John

Reply all
Reply to author
Forward
0 new messages