Someone gives me a password to configure for a local Linux user account. We're managing local user accounts with Puppet, which needs a hash just like the one that's in /etc/shadow. Setting the password through manual means is not an option.
This Python foo:
python -c 'import crypt; print crypt.crypt("actual password here", "$6$random_salt")'
so to make a hash of the password 'password' using salt = cMLi2vqIIJtq1Shm
python -c 'import crypt; print crypt.crypt("password", "$6$cMLi2vqIIJtq1Shm")'
$6$cMLi2vqIIJtq1Shm$NPPssNooZjJdjT6SqKFS6IBiodoczgmACHLennml8kq1KHWwMQ5M4WNzgVdQR9JB5aGyuMFVNaLPxo3JRwLqm/
You can take that string and put it in /etc/shadow and be in business.
Thanks to this post for the answer.
Here i created a tool for generating shadow password easily.
Btw results might be different. Because i openssl with md5 salt. sooo this will make impact?