/etc/login.defs v. /etc/pam.d
How can I tell with method of login I'm using?
I'm trying to set a password minimum length to 8 but I can't get it to work.
[root]cat /etc/login.defs | grep PASS_MIN_LEN | grep -v "#"
PASS_MIN_LEN 8
[root]cat /etc/pam.d/system-auth | grep minlen
password required /lib/security/pam_cracklib.so minlen=8
Neither of these seem to work. My shell is set to /bin/ksh.
Any ideas???
After I added the pam.d entry I get this when I try to change the password to a length of 6.
$ passwd
Changing password for user testme.
Changing password for testme
(current) UNIX password:
New password:
Retype new password:
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
And of course the new password is only 6 characters long.
Password complexity may not apply for root user
I'm not a Linux expert but in my experience the root user is not held to the same password complexity requirements. In your example it seemed you were changing the root password. Did you try setting the password of another non-root user (while logged in as that user, not root)?