How to enforce Password complexity for root in Redhat

I have used module to enforce the password complexity. But its applying only for selfuser. I mean, If i login into a user(not root) and change the password for that user, complexity rules are applying but if i change the password from root, complexity check is not happening.

I found pam_passwdqc module for RHEL6 to enforce the complexity for root also. Can you suggest me similar for RHEL7 and UBUNTU 14.04.

Note: pam_passwdqc is availale for RHEL5&6


Enforcing the policy for root can be accomplished using:

       The module will return error on failed check even if the user changing the password is root. This option is off by default which means that just the message about the failed check is printed but root can change the
       password anyway. Note that root is not asked for an old password so the checks that compare the old and new password are not performed.                                                                                             

It’s documented in the manual page.

Source : Link , Question Author : Aravind Peddapalli , Answer Author : dawud

Leave a Comment