Which File Holds Encrypted Password in Unix?
Contents

Passwords were traditionally stored in the /etc/passwd file in an encrypted format (hence the file’s name). However, because of advances in processor speed, encrypted passwords are now almost universally stored in separate shadow password file s, which are described later.

Which file stores the encrypted password?

The encrypted passwords are stored in the /etc/security/passwd file. The following example contains the last four entries in the /etc/security/passwd file based on the entries from the /etc/passwd file shown previously.

How are UNIX passwords encrypted?

UNIX password encryption uses the DES algorithm 25 times in a row. The first DES round uses 64 0-bits as input and encrypts them with the password the user inputs, with a permutation taking place during the encryption process. There are 4096 possible permutations. The permutation used is randomly chosen for each user.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest