免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3611 | 回复: 10

[桌面系统] 添加用户时,更改最短密码要求 [复制链接]

论坛徽章:
0
发表于 2013-03-09 19:15 |显示全部楼层
我再看ubuntu 的官方文档,https://help.ubuntu.com/12.04/serverguide/user-management.html
期中修改密码最短要求那里一直试不出来,求解
这是我原来的/etc/pam.d/common-password ,12.04默认应该就是这样的
我想要将密码改成最短8个字符,应该怎么修改呢?
代码:
  1. # This file is included from other service-specific PAM config files,
  2. # and should contain a list of modules that define the services to be
  3. # used to change user passwords.  The default is pam_unix.

  4. # Explanation of pam_unix options:
  5. #
  6. # The "sha512" option enables salted SHA512 passwords.  Without this option,
  7. # the default is Unix crypt.  Prior releases used the option "md5".
  8. #
  9. # The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
  10. # login.defs.
  11. #
  12. # See the pam_unix manpage for other options.

  13. # As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
  14. # To take advantage of this, it is recommended that you configure any
  15. # local modules either before or after the default block, and use
  16. # pam-auth-update to manage selection of other modules.  See
  17. # pam-auth-update(8) for details.

  18. # here are the per-package modules (the "Primary" block)
  19. password   [success=1 default=ignore]   pam_unix.so obscure sha512
  20. # here's the fallback if no module succeeds
  21. password   requisite         pam_deny.so
  22. # prime the stack with a positive return value if there isn't one already;
  23. # this avoids us returning an error just because nothing sets a success code
  24. # since the modules above will each just jump around
  25. password   required         pam_permit.so
  26. # and here are more per-package modules (the "Additional" block)
  27. password   optional   pam_gnome_keyring.so
  28. # end of pam-auth-update config
复制代码

论坛徽章:
0
发表于 2013-03-12 13:36 |显示全部楼层
要修改的是什么密码呢?如果是用户的密码,可以用命令  root#passwd  username   

保存密码的文件里的密码都是经过加密的哦!

论坛徽章:
0
发表于 2013-03-12 14:40 |显示全部楼层
改这行
password   [success=1 default=ignore]   pam_unix.so obscure sha512 min=8

论坛徽章:
29
技术图书徽章
日期:2013-09-02 19:59:502015元宵节徽章
日期:2015-03-06 15:51:332015小元宵徽章
日期:2015-03-06 15:57:20操作系统版块每日发帖之星
日期:2015-08-16 06:20:002015七夕节徽章
日期:2015-08-21 11:06:17操作系统版块每日发帖之星
日期:2015-09-21 06:20:002015亚冠之水原三星
日期:2015-10-30 00:06:07数据库技术版块每日发帖之星
日期:2015-12-24 06:20:0015-16赛季CBA联赛之上海
日期:2016-01-07 10:32:07操作系统版块每日发帖之星
日期:2016-01-08 06:20:00操作系统版块每日发帖之星
日期:2016-05-18 06:20:00IT运维版块每日发帖之星
日期:2016-07-23 06:20:00
发表于 2013-03-13 08:32 来自手机 |显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
发表于 2013-03-14 09:23 |显示全部楼层
好吧,我错了!回复 4# Hongqiyaodao


   

论坛徽章:
0
发表于 2013-03-15 01:53 |显示全部楼层
回复 3# pix77
试过了。。这样不行

   

论坛徽章:
0
发表于 2013-03-15 08:18 |显示全部楼层
ceclinux 发表于 2013-03-09 19:15
我再看ubuntu 的官方文档,https://help.ubuntu.com/12.04/serverguide/user-management.html
期中修改密码 ...

在/etc/login.defs 中有一行PASS_MIN_LEN

论坛徽章:
0
发表于 2013-03-15 09:53 |显示全部楼层
嗯,这样也行

论坛徽章:
31
CU大牛徽章
日期:2013-03-13 15:15:08CU大牛徽章
日期:2013-05-20 10:46:18CU大牛徽章
日期:2013-05-20 10:46:25CU大牛徽章
日期:2013-05-20 10:46:31CU大牛徽章
日期:2013-05-20 10:46:38CU大牛徽章
日期:2013-05-20 10:46:44CU大牛徽章
日期:2013-09-18 15:16:55CU大牛徽章
日期:2013-09-18 15:18:22CU大牛徽章
日期:2013-09-18 15:18:43CU十二周年纪念徽章
日期:2013-10-24 15:41:34丑牛
日期:2013-12-01 10:11:07水瓶座
日期:2014-01-15 08:47:25
发表于 2013-03-15 09:55 |显示全部楼层
zjhxmjl 发表于 2013-03-15 08:18
在/etc/login.defs 中有一行PASS_MIN_LEN



感谢分享。。

论坛徽章:
0
发表于 2013-03-19 20:47 |显示全部楼层
回复 8# pix77


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP