The /etc/shadow file has a unique format in which the entries are entered and saved when new users are created.
htb-student: $y$j9T$3QSBB6CbHEu…SNIP…f8Ms: 18955: 0: 99999: 7: : : :
<username>: <encrypted password>: <day of last change>: <min age>: <max age>: <warning period>: <inactivity period>: <expiration date>: <reserved field>
The encryption of the password in this file is formatted as follows:
$ <id> $ <salt> $ <hashed>
$ y $ j9T $ 3QSBB6CbHEu…SNIP…f8Ms
The type (id) is the cryptographic hash method used to encrypt the password. Many different cryptographic hash methods were used in the past and are still used by some systems today.
ID Cryptographic Hash Algorithm
$1$ MD5
$2a$ Blowfish
$5$ SHA-256
$6$ SHA-512
$sha1$ SHA1crypt
$y$ Yescrypt
$gy$ Gost-yescrypt
$7$ Scrypt