0

I use Ubuntu 16.04 LTS, and I'm wondering where I can find the hashes for the user account passwords.

  • 1
    In /etc/shadow. – AlexP Jan 3 '17 at 21:45
  • 1
    How is this a duplicate of /etc/shadow encryption method? How was the OP supposed to find that? You need to know the answer to this question... – Stephen Kitt Jan 3 '17 at 21:55
  • I agree with @stephen, there no way this question is the duplicate of /etc/shadow encryption method. But I'm sure that a little search on Google like "where are the passwords stored in Linux" would give the answer. – Sidahmed Jan 3 '17 at 22:06
  • 1
    Indeed, the answer on the other question talks about how to compute the hash. A proper answer to this question would discuss pam-auth-update and /etc/pam.d/common-auth, at least. Remember also that our goal should be to not only answer the OP's question but leave a useful artifact for future visitors, so an ideal answer wouldn't just presume a default install. I.e., a future person who inherits a Debian box could find /etc/shadow empty-ish, and wonder "where ARE the passwords kept‽" – derobert Jan 3 '17 at 22:13
  • 1
    keeping in mind that the password may be stored in an LDAP of some sort (openldap, AD, NIS) – Jeff Schaller Jan 4 '17 at 2:25
3

User information is stored in /etc/passwd and passwords are stored /etc/shadow

Each entry in /etc/shadow contains the user's login, their encrypted password, and a number of fields relating to password expiration

1

Total user information means

    1. Account Information
    2. Authentication Information

Account Information store in /etc/passwd file

Authentication Information store in /etc/shadow file but only Only root user can see the information

So if you want to see the authentication information means password information you may check the /etc/shadow file with

    $sudo cat /etc/shadow

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.