Sample Header Ad - 728x90

/etc/shadow file and password storing algorithm in Linux

0 votes
1 answer
138 views
I don't know what's algorithm of storing password in /etc/shadow in Linux.
I tested via the following script via python: import hashlib message = b"123" md5_hash = hashlib.md5(message).hexdigest() sha1_hash = hashlib.sha1(message).hexdigest() sha256_hash = hashlib.sha256(message).hexdigest() sha384_hash = hashlib.sha384(message).hexdigest() sha512_hash = hashlib.sha512(message).hexdigest() print(f"MD5: {md5_hash}") print(f"SHA-1: {sha1_hash}") print(f"SHA-256: {sha256_hash}") print(f"SHA-384: {sha384_hash}") print(f"SHA-512: {sha512_hash}") But I did't see my password.My password is 123.
1. Does shadow store as HASH? if yes I should discard getting password.
2. If password doesn't store as hash, How can I get it?
Asked by PersianGulf (11308 rep)
Feb 22, 2025, 06:16 AM
Last activity: Feb 22, 2025, 04:19 PM