Is there a maximum password length on unix systems?

If so, what is that limit and is it distribution dependent?

  • 1
    Answered here superuser.com/questions/148971/… – M_dk Feb 5 '14 at 7:56
  • today most distribution will use sha256/512 older will more likely use md5 – Kiwy Feb 5 '14 at 8:26
  • The days of DES where the password was truncated at the 8th byte are long gone. Now, that's down to the limitations in the applications where you enter your password. For instance, for HTTP basic auth, IIRC, the max HTTP header length is 1024 bytes, so taking into account other overhead, your password can't be much over 600 bytes if it needs to go in there. – Stéphane Chazelas Feb 5 '14 at 8:58

Depends on which particular crypt() algorithm one is using:

  • modified DES: 8 ASCII characters
  • MD5: Unlimited length
  • Blowfish: 56 bytes
  • NT Hash: Please don't use this one
  • SHA256/512: Unlimited length

More information: http://en.wikipedia.org/wiki/Crypt_%28C%29

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.