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.
sha*sum
is usually hex but the crypt output is base64 (but not the traditional base64!) – muru Aug 24 '23 at 10:13