The Problem
While changing password using the passwd command, the following error appears:
"passwd: Module is unknown"
The Solution
There is a unknown PAM module pam_pwquality.so in /etc/pam.d/system-auth file. The pam_pwquality.so module should be used in CentOS/RHEL 7 rather than CentOS/RHEL 6.
# cat /etc/pam.d/system-auth
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 500 quiet
auth required pam_deny.so
account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 500 quiet
account required pam_permit.so
password requisite pam_pwquality.so try_first_pass local_users_only retry=3 minlength=8 lcredit=0 ucredit=-1 dcredit=-1 ocredit=-1 authtok_type=
password requisite pam_cracklib.so ucredit=-1 minclass=3 ocredit=-1 enforce_for_root lcredit=-1 dcredit=-1 minlen=6
password requisite pam_pwhistory.so enforce_for_root remember=12
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password required pam_deny.so
pam_pwquality.so is used to check the strength of password and replaces the pam_cracklib.so in CentOS/RHEL 7. Remove this pam_pwquality.so from the configuration file in CentOS/RHEL 6.
# grep pam_pwquality.so /etc/pam.d/system-auth #
Now try chaning the password again.
# passwd oracle Changing password for user oracle. New password: