passwd length

Hi all,

can anyone explain the maximum password length that we can set for users in solaris 9 and solaris 10.

thanks in advance
dinu

There is no maximal password length enforced. However, depending on the algorithm selected to hash a password, only its first n characters will be used and the remaining ones ignored. The default standard unix crypt algorithm picks the first 8 letters of the password to build its hash.

To change this, either use a better backend for authenticating users (e.g. ldap) or replace the algorithm used to encrypt /etc/shadow password fields by setting CRYPT_DEFAULT=X in /etc/security/policy.conf
X=1 is for linux/bsd compatibility
X=2a is for blowfish
X=md5

As all this is plugin based, you can even write your own that demand say 32 minimal password length, and add it to the /etc/security/crypt.conf file