0

Good morning, everyone,

Do you know if it is possible to change the password hash method? Instead of DES, MD5, SHA256, SHA512 or other, I would like to be able to use bcrypt or argon2 for example.

Thanks in advance :)

0

No, you are restricted to the policies supplied for Ubuntu. From the man /etc/login.defs:

It can take one of these values: DES (default), MD5, SHA256,
SHA512. MD5 and DES should not be used for new hashes, see
crypt(5) for recommendations.

I could not find any reasoning for Ubuntu or Debian not accepting bcrypt and only for Redhat. They discarded bcrypt in 2018 because it does not add more security over sha512 and it had too many outstanding bugs. Argon2 was discarded due to the high amount of memory it needs. 2a is the one you want:

 ID  | Method
 ─────────────────────────────────────────────────────────
 1   | MD5
 2a  | Blowfish (not in mainline glibc; added in some Linux distributions)
 5   | SHA-256 (since glibc 2.7)
 6   | SHA-512 (since glibc 2.7)

and no Ubuntu is not one of "some Linux distributions". SUSE is the only big Linux that also uses bcrypt.

3
  • Too bad, I would have liked to use it :( Thanks for your answer :D – math3r0se Aug 6 '20 at 14:36
  • @rinzwind 2a is actually a revision of bcrypt. Please change this answer accordingly. – Ben Jan 6 at 11:21
  • @Ben "2a is the one you want:" already explains it is bcrypt. And it does not change the answer: 2a is not available on default Ubuntu. – Rinzwind Jan 6 at 11:26

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.