zoukankan      html  css  js  c++  java
  • linux系统修改用户密码报错

    版权声明:本文为博主原创文章,支持原创,转载请附上原文出处链接和本声明。

    本文地址:https://www.cnblogs.com/wannengachao/p/12069113.html

    1、设置新密码,第二次输入相同密码验证报错

    报错如下:

    [root@node1~]# passwd test
    Changing password for user test.
    New password:
    BAD PASSWORD: The password is shorter than 8 characters
    Retype new password:
    passwd: Authentication token manipulation error

    排查文件是否被上锁:(我的报错就是因为文件被上i锁导致文件)

    命令 lsattr 文件名 

    ## 如下图排查发现文件被上了i锁

     解决:

    chattr -i 文件名

    解锁后并验证,查看 i 锁取消后再次修改密码即可

    磁盘满了,或者inode满了,也会导致出现此种错误,通过df -h与df -i 查看

    2、设置新密码第一次输入就报错

    [root@node1 ~]# passwd test

    Changing password for user test .

    passwd: Authentication token manipulation error

    You have new mail in /var/spool/mail/root

     

    排查:/etc/pam.d/ 是否正常,下图为正常内容,文件内容不正常也会引起此报错(例如有个注释之类的)

    可与下方正常内容进行对比排查。##仅供参考

     解决:

    将错误地方修改为正常状态即可。

    排查2:

    /etc/pam.d/system-auth 文件内容是否正常,可与下方正常内容进行对比排查。##仅供参考

    [root@kelong1 shi]# cat /etc/pam.d/system-auth
    #%PAM-1.0
    # This file is auto-generated.
    # User changes will be destroyed the next time authconfig is run.
    auth required pam_env.so
    auth required pam_faildelay.so delay=2000000
    auth sufficient pam_fprintd.so
    auth sufficient pam_unix.so nullok try_first_pass
    auth requisite pam_succeed_if.so uid >= 1000 quiet_success
    auth required pam_deny.so

    account required pam_unix.so
    account sufficient pam_localuser.so
    account sufficient pam_succeed_if.so uid < 1000 quiet
    account required pam_permit.so

    password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
    password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
    password required pam_deny.so

    session optional pam_keyinit.so revoke
    session required pam_limits.so
    -session optional pam_systemd.so
    session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
    session required pam_unix.so

  • 相关阅读:
    ACM的算法分类 2015-04-16 14:25 22人阅读 评论(0) 收藏
    初学Larevel 2014-08-21 11:24 90人阅读 评论(0) 收藏
    初学PHP&MySQL 2014-05-31 12:40 92人阅读 评论(0) 收藏
    codeforces 570 E. Pig and Palindromes (dp)
    codeforces 570 D. Tree Requests (dfs序)
    poj 2157 Maze (bfs)
    cf 570 C. Replacement (暴力)
    cf 570B B. Simple Game(构造)
    cf 570 A. Elections
    hdu 1429胜利大逃亡(续) (bfs+状态压缩)
  • 原文地址:https://www.cnblogs.com/wannengachao/p/12069113.html
Copyright © 2011-2022 走看看