minpasswordlen and login.conf not working on 6 or 7 series

Omer Faruk Sen omerfsen at gmail.com
Wed May 7 21:00:05 UTC 2008


Hi,


I wanted to set  the minimum length of  passwords  of my users so I
have done the followings in login.conf

1) added  :minpasswordlen=5:\ to    default like:


default:\
        :passwd_format=md5:\
        :copyright=/etc/COPYRIGHT:\
        :welcome=/etc/motd:\
        :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
        :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/loca
l/bin ~/bin:\
        :nologin=/var/run/nologin:\
        :cputime=unlimited:\
        :datasize=unlimited:\
        :stacksize=unlimited:\
        :memorylocked=unlimited:\
        :memoryuse=unlimited:\
        :filesize=unlimited:\
        :coredumpsize=unlimited:\
        :openfiles=unlimited:\
        :minpasswordlen=5:\
        :maxproc=unlimited:\
        :sbsize=unlimited:\
        :vmemoryuse=unlimited:\

2) Have run cap_mkdb /etc/login.conf

After that still the users can change their passwords to less than 5
characters and no warning are shown to the user . I have tested this
at FreeBSD 6.2, FreeBSD 6.3 and even on FreeBSD 7.0 it doesn't work

But I have found a FreeBSD 4.11 and followed the same steps and I got
following on passwd command:

ns1~# passwd xxxxx
Changing local password for xxxxx.
New password:
Please enter a password at least 5 characters in length.
New password:
Password unchanged.


Am I missing something here? Or this may be a bug on FreeBSD 6.X and 7.X

Regards.


More information about the freebsd-questions mailing list