What file under the /etc folder contains the hashed passwords for a local system?

384    Asked by AndrewJenkins in Cyber Security , Asked on Feb 8, 2022

Is there a specific location where the passwords are stored ?

Is it depending on which version is used ?

Are they salted ?

Answered by Anil Jha

The answer to the question - What file under the /etc folder contains the hashed passwords for a local system is that Passwords in unix were originally stored in /etc/passwd (which is world-readable), but then moved to /etc/shadow (and backed up in /etc/shadow-) which can only be read by root (or members of the shadow group). The passwords are salted and hashed. The default formats are MD5-crypt, bcrypt, sha256-crypt, sha512-crypt, and for historical reasons DES (note DES only allows 8-byte passwords). Note, sha512-crypt typically involves 5000 rounds of SHA512-ing the password and the number of rounds is configurable. For more info consult man crypt, man shadow, man password.



Your Answer

Interviews

Parent Categories