I'm new to Ubuntu i have made to 2 ordinary users in my Ubuntu and provided them same password but now i want to check is passwords are similar but don't know where to look for it or what command line to write in terminal. Where to find /etc/password.
There are two main files related to system user authentication:
/etc/shadow. The actual user's passwords are stored as hashed version in the
shadow file. They are hashed by the
crypt function. It is not possible to "decrypt" any password from the
shadow file, because hashing is one way mechanism.
Most simply: When the user enters а password, it is processed and compared to the hashed password stored in the
shadow file. But when one try to "decrypt" a password from the
shadow file - there are over than thousands possible results.
/etc/passwdcontains one line for each user account, with seven fields delimited by colons (
These fields are: 1. login name; 2. optional encrypted password; 3. UID; 4. GID; 5. user name or comment field; 6. user home directory; 7. optional user command interpreter.
The encrypted password field may be blank, in which case no password is required... However, some applications which read the
/etc/passwdfile may decide not to permit any access at all if the password field is blank.
If the password field is a lower-case
x, then the encrypted password is actually stored in the
shadowfile instead; there must be a corresponding line in the
/etc/shadowfile, or else the user account is invalid. If the password field is any other string, then it will be treated as an encrypted password, as specified by
/etc/shadow- shadowed password file - is a file which contains the password information for the system's accounts and optional aging information. Each line of this file contains 9 fields, separated by colons (
The fields are: 1. login name; 2. encrypted password - refer to
cryptfor details on how this string is interpreted; 3. date of last password change; 4. min password age; 5. max password age; 6. password warning period; 7. password inactivity period; 8. account expiration date; 9. reserved field. (source: