Mailing List Archive

pam cracklib. Why credits are not working.
Hello.

I'm trying to exploit cracklib to force users to use better passwords. But
dcredit=N, ucredit=N, lcredit=N, ocredit=N are not taken into account on my
system when user tries to passwd. Below are pam configuration files:

cat /etc/pam.d/passwd
#%PAM-1.0
auth required /lib/security/pam_stack.so service=system-auth
account required /lib/security/pam_stack.so service=system-auth
password required /lib/security/pam_stack.so service=system-auth

So everything is stacked on system-auth. Now what I have in system-auth:
cat /etc/pam.d/system-auth
#%PAM-1.0
auth required /lib/security/pam_env.so
auth sufficient /lib/security/pam_unix.so likeauth nullok
auth required /lib/security/pam_deny.so
account required /lib/security/pam_unix.so
password required /lib/security/pam_cracklib.so retry=3 diffok=3
minlen=8 dccredit=2 upcredit=2 lcredit=2 ocredit=1 type=XXX
password sufficient /lib/security/pam_unix.so nullok md5 shadow
use_authtok
password required /lib/security/pam_deny.so
session required /lib/security/pam_limits.so
session required /lib/security/pam_unix.so

So you see I want password to be more then 8 character long to have 2 digits,
2 upper, 2 lower case and 1 other characters. Now as ordinary user I try to
use passwd with password "qwertyuiop" and this works! Can anybody enlight me
why I can use password without digits?

Thank you for your attention,
--

______________________________________

Volkov Peter, <pvolkov@mics.msu.su>
General Physics Institute,
Russian Academy of Sciences.
______________________________________

NO ePATENTS, eSIGN now on:
http://petition.eurolinux.org
and maybe this helps...

Linux 2.4.26-gentoo-r9 i686
Mobile Intel(R) Celeron(R) CPU 1.60GHz

--
gentoo-security@gentoo.org mailing list
Re: pam cracklib. Why credits are not working. [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Am Sonntag, 28. November 2004 16:29 schrieb Peter Volkov Alexandrovich:
> cat /etc/pam.d/system-auth
> #%PAM-1.0
> ...
> password required /lib/security/pam_cracklib.so retry=3 diffok=3
> minlen=8 dccredit=2 upcredit=2 lcredit=2 ocredit=1 type=XXX
> password sufficient /lib/security/pam_unix.so nullok md5 shadow
> use_authtok
> password required /lib/security/pam_deny.so
...
> So you see I want password to be more then 8 character long to have 2
> digits, 2 upper, 2 lower case and 1 other characters. Now as ordinary
> user I try to use passwd with password "qwertyuiop" and this works! Can
> anybody enlight me why I can use password without digits?

Please check the return-value of /bin/passwd:
it'll have non-zero $?, although the changing of your passwd has succeeded!
- -> http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam-4.html#ss4.1

Please try:
# no further module should be executed after pam_cracklib has failed!
password requisite /lib/security/pam_cracklib.so ...

Just my 2 cents of €,

Henning
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBqgSRuI8iUC+SACIRAo22AJ42kNXeFmyJRz04fuhZQdBtQip8qACgqAzF
I9jZVT7/2Cx19EVGQ7dpiGo=
=j4U7
-----END PGP SIGNATURE-----

--
gentoo-security@gentoo.org mailing list