Linux Upgrade Password Hashing Algorithm to SHA-512

https:‮//‬www.lautturi.com
Linux Upgrade Password Hashing Algorithm to SHA-512

To upgrade the password hashing algorithm to SHA-512 on a Linux system, you can use the following steps:

  1. Edit the /etc/pam.d/common-password file: Open the /etc/pam.d/common-password file in a text editor.

  2. Find the password section: Look for the password section in the file. It should contain a line that starts with password and specifies the password hashing algorithm.

  3. Change the password hashing algorithm: Change the password hashing algorithm to sha512 by modifying the line in the password section. It should now look like this:

password [success=1 default=ignore] pam_unix.so sha512
  1. Save the file and update the password hashes: Save the changes to the /etc/pam.d/common-password file and exit the text editor. Then, run the following command to update the password hashes for all users:
sudo pam-auth-update

This will update the password hashes for all users to use the SHA-512 hashing algorithm.

Keep in mind that you will need to have root privileges (or be a member of the sudo group) in order to edit the /etc/pam.d/common-password file and update the password hashes.

After making these changes, the password hashing algorithm will be upgraded to SHA-512 for all users on the system.

Created Time:2017-10-30 10:17:39  Author:lautturi