Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I found on the AIX documentation some rules to set about passwords length :

minlen Defines the minimum length of a password. The value is a decimal integer string. The default is a value of 0, indicates no minimum length. The maximum value allowed is PW_PASSLEN attribute. This attribute is determined by the minalpha attribute value added to the minother attribute value. If the sum of these values is greater than the minlen attribute value, the minimum length is set to the result.

Note: The PW_PASSLEN attribute is defined in /usr/include/userpw.h. The value of the PW_PASSLEN attribute is determined by the system-wide password algorithm that is defined in /etc/security/login.cfg .

The minimum length of a password is determined by the minlen attribute and should never be greater than the PW_PASSLEN attribute. If the minalpha attribute + minother attribute is greater than the PW_PASSLEN attribute, then the minother attribute is reduced to PW_PASSLEN attribute - minalpha attribute.

But, for consistency, I need to set the max length for password to 12.

I dont understand exactly how to configure the userpw.h to set this max at 12.

There is my actual PW_PASSLEN :

#define PW_PASSLEN   ((__extension_status & _EXTENSION_C2)? \
                       max_pw_passlen():__get_pwd_len_max())
share|improve this question
    
I hardly understand why you need to set a maximum length to your passwords. Isn't it the point: having longer passwords to provide better security? I think this is why there is no such thing as a maximum password length. –  Gael Jan 11 '13 at 12:25
add comment

2 Answers

up vote 2 down vote accepted
+50

I believe you need to modify the value for MAXIMPL_PW_PASSLEN in /usr/include/userpw.h, from 256 to 12, but I would strongly suggest you read the documentation in that file, and test this on a non-critical box. If you have access, I'd suggest verifying this with IBM support.

share|improve this answer
add comment

See the /etc/security/user file: this contains the minalpha/minother/etc values you need to change :)

share|improve this answer
    
There is a lot of values (that I use) bot no configuration for the max length. –  Pierre-Louis Laffont Jan 4 '13 at 14:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.