Where user information is stored
User names and primary groups are stored in /etc/passwd. To see this file:
cat /etc/passwd
This file can be directly edited, although this is not recommended. The format of each line is:
User name (normally all lower case)
Password (encrypted – only contains the letter ‘x’)
User ID (UID) (a unique number for each user)
Primary Group ID (GID)
Comment or “GECOS” (Often the person’s full name)
Home directory (normally /home/<user name>)
Default shell (normally /bin/bash)
Each field is separated by a colon.
Where passwords are stored
Passwords for each user are stored in /etc/shadow (assuming password shadowing has been implemented, which it almost always is). This file should only be changed using the useradd, usermod, or passwd commands.
Try this to see the MD5 or SHA hashed passwords:
cat /etc/shadow