I'm puzzled by the hash (ASCII) code stored under Linux (Ubuntu) /etc/shadow.
Taking a hypothetical case, let password be 'test', salt be 'Zem197T4'.
By running following command,
$ mkpasswd -m SHA-512 test Zem197T4
A long series of ASCII characters are generated (This is actually how Linux store in the /etc/shadow)
$6$Zem197T4$oCUr0iMuvRJnMqk3FFi72KWuLAcKU.ydjfMvuXAHgpzNtijJFrGv80tifR1ySJWsb4sdPJqxzCLwUFkX6FKVZ0
When using online SHA-512 generator (e.g. http://www.insidepro.com/hashes.php?lang=eng), what is generated is some hex code as below:
option 1) password+salt
8d4b73598280019ef818e44eb4493c661b871bf758663d52907c762f649fe3355f698ccabb3b0c59e44f1f6db06ef4690c16a2682382617c6121925082613fe2
option 2) salt+password
b0197333c018b3b26856473296fcb8637c4f58ab7f4ee2d6868919162fa6a61c8ba93824019aa158e62ccf611c829026b168fc4bf90b2e6b63c0f617198006c2
I believe these hex code should be the 'same thing' as the ascii code generated by mkpasswd. But how are they related?
Hope someone could enlighten me?