Linux-based systems handle everything in the form of files. Passwords are stored in encrypted form in the /etc/shadow file. These passwords are commonly stored as hashes rather than plaintext.

  • An example of shadow:

    user:$y$j9T$QxFw8T.D1bD2w6...SNIP...f8Ms:18955:0:99999:7:::
  • Breakdown:

Hashes Used

In password hashes like $y$j9T$QxFw8T.D1bD2w6...SNIP...f8Ms:, the $y$ part is called the ID.
This (ID) indicates which cryptographic hash method was used to encrypt the password.

Common cryptographic hash methods include:

IDCryptographic Hash Algorithm
$1$MD5
$2a$Blowfish
$5$SHA-256
$6$SHA-512
$sha1$SHA1crypt
$y$Yescrypt
$gy$Gost-yescrypt
$7$Scrypt