• [zz]linux修改密码出现Authentication token manipulation error的解决办法


     年底需要修改一次密码,修改的时候遇到了问题,无法修改密码,经过baidu 、google,找到了可能引起的原因,成功修改密码。
    以下内容来自于网络。


    Authentication token manipulation error

    发生该错误原因是:

    1、分区没有空间导致。
    2、/etc/passwd 和/etc/shadow不同步
    但是这次上面两条却行不通,通过df查看根分区还有40%剩余。
     
    1、尝试修改密码,出现错误
    # passwd
    Changing password for user root.
    New UNIX password:
    BAD PASSWORD: it is WAY too short
    Retype new UNIX password:
    passwd: Authentication token manipulation error
    2、同步/etc/passwd 和/etc/shadow出错
     #pwconv
    pwconv: can't lock passwd file
    3、看权限没有异常,也没有进程锁定该文件
    # ll /etc/passwd
    -rwxr--r--  1 root root 2752 Dec 31 17:29 /etc/passwd
    # fuser -u /etc/passwd
    # lsof |grep passwd
    4、cp lock文件出错,提示空间不足
    # cp /tmp/.pwd.lock /etc/
    cp: cannot create regular file `/etc/.pwd.lock': No space left on device
    5、上面的错误惊醒了我,查看确实是inode满了,删除无用的文件
    #df -i
    Filesystem            Inodes   IUsed   IFree IUse% Mounted on
    /dev/sda5            2562240 2562240       0  100% /
    /dev/sda1              50200      47   50153    1% /boot
    /dev/sda2            51300000      12 51299988    1% /data/cache1
    /dev/sdb1            51300000 7080311 44219689   14% /data/cache2
    /dev/sdb2            9863168      11 9863157    1% /data/proclog
    none                  215907       1  215906    1% /dev/shm
    /dev/sda3            3842720  305795 3536925    8% /usr
    /dev/sda7            3162112    7893 3154219    1% /var
    6、再次修改密码仍然出错,于是尝试修改/etc/passwd也出现错误
    # chmod 777 /etc/passwd
    chmod: changing permissions of `/etc/passwd': Operation not permitted
    7、执行chattr 
    #chattr -i  /etc/passwd
    # lsattr -v /etc/passwd
    2095582053 ------------- /etc/passwd
    # chattr -i  /etc/shadow
    8、同步文件
    pwconv

    9、成功修改密码
    passwd
    Changing password for user root.
    New UNIX password:
    BAD PASSWORD: it is WAY too short
    Retype new UNIX password:
    passwd: all authentication tokens updated successfully.

  • 相关阅读:
    gRPC-web现状及测试
    文件差异性 订单列表差异性 列表数据更新 比较
    Writing a Time Series Database from Scratch | Fabian Reinartz https://fabxc.org/tsdb/
    Prometheus is a system to collect and process metrics, not an event logging system
    whisper
    New in Prometheus v2.19.0: Memory-mapping of full chunks of the head block reduces memory usage by as much as 40%
    使用proxy是实现集中式和分布式监控的最简单方法
    t
    SSO登录 企业域名
    指针分析 Pointer Analysis
  • 原文地址:https://www.cnblogs.com/zhangzhang/p/2878624.html
Copyright © 2020-2023  润新知