Minimum Password Length
I've just installed Redhat 9 and need to setup up a user with a minimum password length of 5 characters. System returns a message saying that password is too short min 6 characters.
I've checked the following:
/etc/login.defs PASS_MIN_LEN is set to 5
/etc/pam.d/passwd ALL setting were set to required so I changed them to optional
Still no joy. Any help would be greatfully recieved
You should not have set them to optional in the PAM config. That's just the modules that are required to be successful in order to change your password. Change them back, or bad things might happen.
Instead, check out /etc/pam.d/system-auth and the arguments to pam_cracklib. Try setting the parameter minlen=5. I'm not sure if that will work, though; pam_cracklib has a hardcoded limit, but I'm not sure if that's set to four or six characters.
You can always set the user's password as root. Then it will always accept any password. It will still print error messages, but the password will be set in the end anyway.
Adding the minlen=5 to the pam_cracklib worked. Still shows error when you change password but accepts the new one.
Thanks very much for your help.