Sample Header Ad - 728x90

How to calculate the password hash in /etc/shadow

0 votes
0 answers
50 views
I have the following line in my /etc/shadow file (SALT and HASHED_PASSWORD are not real values for obvious reason). And I understand $6 means SHA512 is used.
testuser:$6$SALT$HASHED_PASSWORD:19591:0:99999:7:::
I wonder how do I combine the SALT and my real password PASSWD as input for SHA512 to get the HASHED_PASSWORD value? I tried to run sha512sum command and paste in PASSWD+SALT and SALT+PASSWD (without the + sign). But the result is nothing like the HASHED_PASSWORD stored in the file.
Asked by DrizzleX (125 rep)
Aug 22, 2023, 04:09 AM