Information
If the pam_passwdqc enforce=everyone option is enabled, the module will return an error on the failed check, even if the user changing the password is the root.
This option is off by default, meaning only the message about the failed check is printed, but root can change the password anyway.
Note: The root user is not asked for an old password, so the checks that compare the old and new passwords are not performed.
Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks.
Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised.
Solution
Create or modify the file /etc/pam.d/passwd and add or modify the following line to ensure that password quality is enforced for everyone including root user:
Example:
password requisite pam_passwdqc.so enforce=everyone minlen=disabled,14,12,8,6