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 :)
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
No, you are restricted to the policies supplied for Ubuntu. From the man
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.