Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 2008 00:00:04 +0300
From:      "Omer Faruk Sen" <omerfsen@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   minpasswordlen and login.conf not working on 6 or 7 series
Message-ID:  <75a268720805071400o2eb75c54y77c11790407cf045@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?75a268720805071400o2eb75c54y77c11790407cf045>