Find the answer to your Linux question:
Results 1 to 6 of 6
Hi All, I am not a Linux user but and learning about it in a class and thought I would check it out. My teacher said that two linux users ...
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    1

    Linux Password Question

    Hi All,

    I am not a Linux user but and learning about it in a class and thought I would check it out. My teacher said that two linux users cannot have the same passwords but never explained why?

    Basic but can anyone help me out?

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    They should not, because this is close to a "shared account" aka: you as a admin cannot be sure who really is logged in.
    But users can have the same password.
    You must always face the curtain with a bow.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,970
    Quote Originally Posted by Irithori View Post
    They should not, because this is close to a "shared account" aka: you as a admin cannot be sure who really is logged in.
    But users can have the same password.
    Yes, users can have the same plain-text password. When you set your password, the system takes a number of transient factors (date, time, user process id, whatever) to create a "salt" value which is used to create the encrypted version of your password, and that is what is stored in the system files, such as /etc/shadow. When you login, the salt value for your account is found and used to encrypt the plain-text that you type in. That results in an encrypted key that is then compared with what is in the system database. So, even if you and someone else has the same plain-text password, the system will create a different hash/salt value to create the encrypted version. The plain text is never stored on the system, and the encrypted value cannot be used to derive the plain-text version - it is what we call a one-way cipher.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    955
    I think what your teacher meant was that two users should not have the same password. It's a gaping security hole. If one of them got cheesed off with the other, he could simply log on to his account and delete all his files!
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,970
    Quote Originally Posted by hazel View Post
    I think what your teacher meant was that two users should not have the same password. It's a gaping security hole. If one of them got cheesed off with the other, he could simply log on to his account and delete all his files!
    Sorry Hazel, but this doesn't make sense to me. In order for students to know that they have the same password, they have to share them, which is what passwords are trying to avoid. Also, since the ciphers used to generate the encrypted (stored) version are one-way (you cannot derive the plain-text password from the encrypted version), there is no way that the system could determine that two students have identical passwords without running the encryption algorithm on the plain text against all the stored password cipher keys (salt values). Yes, you can do that, but that becomes a security hole also - it is basically what the more effective brute-force attacks do.

    So, in my opinion, if what you say is correct, then that teacher seriously needs a remedial course in computer security.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Linux User Manko10's Avatar
    Join Date
    Sep 2010
    Posts
    250
    Yes. It would also be nonsense if Linux warned you because someone has the same password. Then it should be easy for you to guess whose password this is.
    There is no security risk based on password similarity. More important is to use safe passwords which no one could guess with brute-force and dictionary attacks. And of course if you use strong passwords it's less likely to have the same password for two users but if that happens it is not be a big issue because the password hash is salted.
    Refining Linux Advent calendar: “24 Outstanding ZSH Gems

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...