If you manually want to change the password field in the shadow file, the md5 hashed string can be generated like this:
# openssl passwd -1 <strongpassword> Where the parameter <strongpassword> is the password in clear text. Output will be a md5 hashed string like this: $1$t/Y0/ENi$PccO/XwuuZb4q/uhfh4Yf0
For RHEL6 following python code can be used:
# python -c "import crypt; print crypt.crypt('secretpassword')" Strongest possible hashing algorithm - SHA512 will be used