Sysadmin > LinuX > RedHat > ChangePasswordHashingAlgorithm

How to change default password hashing algorithm

available algorithm

authconfig --help | grep passalgo

Change the default password hashing algorithm

authconfig --passalgo=sha256 --update

This modifies /etc/pam.d/system-auth, /etc/login.defs, /etc/libuser.conf, and /etc/sysconfig/authconfig and will have no effect hashes already stored in /etc/passwd or /etc/shadow. Only executions of passwd will use the new algorithm.