This shows you the differences between two versions of the page.
|
generate_hashed_password_string [2013/04/30 15:07] root created |
generate_hashed_password_string [2013/11/14 09:27] (current) root |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Generate hashed password string ====== | ====== Generate hashed password string ====== | ||
| - | If you manually want to change the password field in the shadow file, the md5 encrypted string can be generated like this: | + | 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 badpassword | + | # 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 | $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 | ||