Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

password must be atleast 12 characters long -- how ?

SOLVED
Go to solution
Maaz
Valued Contributor

password must be atleast 12 characters long -- how ?

How can I configure/set/implement the minimum lenght of password ?

I did the following

in /etc/login.defs

PASS_MIN_LEN 12

But it doesnt work, i.e. even now users can set their password of only 6 characters.

And what I want is that password must be atleast 12 characters long.

Thanks In Advance

Regards
Maaz
2 REPLIES
Chris Xu
Trusted Contributor

Re: password must be atleast 12 characters long -- how ?

Add minlen=12 at the line begining with password in /etc/pam.d/passwd if you have a line like the below:

password required pam_unix.so nullok md5 shadow minlen=12

Chris
Chris Xu
Trusted Contributor
Solution

Re: password must be atleast 12 characters long -- how ?

Sorry I think I gave your incorrect info. Here is the right answer to achieve minimun 12 chars in password.

Your /etc/pam.d/passwd should look like:
auth required pam_stack.so service=system-auth
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth

In your /etc/pam.d/system-auth file, add this minlen=12 to the line like below:
password required /lib/security/$ISA/pam_cracklib.so retry=3 type=

So your modified line should look like:
password required /lib/security/$ISA/pam_cracklib.so retry=3 type= minlen=12

Chris