你好,游客 登录 注册 搜索
背景:
阅读新闻

如何设置PAM模块控制Linux密码策略

[日期:2010-02-23] 来源:Linux社区  作者:Linux编辑 [字体:大 中 小]

  cracklib密码强度检测过程

  首先检查密码是否是字典的一部分,如果不是,则进行下面的检查

  密码强度检测过程

  These checks are:

  Palindrome

  Is the new password a palindrome of the old one?

  新密码是否旧密码的回文

  Case Change Only

  Is the new password the the old one with only a change of case?

  新密码是否只是就密码改变了大小写

  Similar

  Is the new password too much like the old one?

  新密码是否和旧密码很相似

  This is primarily controlled by one argument, difok which is a number of characters that if different between the old and new are enough to accept the new password, this defaults to 10 or 1/2 the size of the new password whichever is smaller.

  To avoid the lockup associated with trying to change a long and complicated password, difignore is available. This argument can be used to specify the minimum length a new password needs to be before the difok value is ignored. The default value for difignore is 23.

  Simple

  Is the new password too small?

  新密码是否太短

  This is controlled by 5 arguments minlen, dcredit, ucredit, lcredit, and ocredit. See the section on the arguments for the details of how these work and there defaults.

  Rotated

  Is the new password a rotated version of the old password?

  新密码的字符是否是旧密码字符的一个循环

  例如旧密码:123

  新密码:231

  Already used

  Was the password used in the past?

  这个密码以前是否使用过

  Previously used passwords are to be found in /etc/security/opasswd.

  那么系统是如何实现这个控制的呢?

  在系统的配置文件/etc/pam.d/system-auth 中有这样一行

  password requisite     pam_cracklib.so try_first_pass retry=3

  我们可以根据pam_cracklib的参数这样配置这个pam模块来达到我们想要的目的

  password required /lib/security/pam_cracklib.so retry=3 type= minlen=8 difok=3 dictpath=/path/to/dict

linux
相关资讯       Linux知识 
本文评论   查看全部评论 (1)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款
第 1 楼
* yyyk 发表于 2012/2/18 21:03:15
这个写的可以,it初使化