转自 :http://blog.163.com/junwu_lb/blog/static/1916798920120103647199/

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.

pwconv

功能说明:开启用户的投影密码。
  语 法:pwconv
  补充说明:Linux系统里的用户和群组密码,分别存放在名称为passwd和group的文 件中,这两个文件位于/etc目录下。因系统运作所需,任何人都得以读取它们,造成安全上的破绽。投影密码将文件内的密码改存在/etc目录下的 shadow和gshadow文件内,只允许系统管理者读取,同时把原密码置换为"x"字符,有效的强化了系统的安全性。
  pwconv:开启用户的shadow口令.
一般来用pwconv来同步口令,下面来说一下,它的工作流程:
  pwconv依赖于passwd中的密码区'x'来同步/etc/passwd与/etc/shadow这两个文件;以/etc/passwd为主来控制/etc/shadow中的各项:
  A:若/etc/shadow不存在,则pwconv将用/etc/passwd来建立
  B:若/etc/shadow已存在,则:
  1.若条目在passwd中已存在,而不在shadow中,则在shadow中添加相关条目
  2.若条目在shadow中已存在,而不在passwd中,则从shadow中删除相关条目

linux修改密码出现Authentication token manipulation error的解决办法的更多相关文章

  1. 无法修改linux/ubuntu密码(Authentication token manipulation error )问题解决过程【转】

    转自:https://blog.csdn.net/caizi001/article/details/38659189 Vmware虚拟机里的ubunut系统长期不用,密码忘记了,无奈只能通过slax ...

  2. 解决"authentication token manipulation error"

      昨天安装是Ubuntu Server. 配置好了几个软件后就忘记继续了...今天打开,居然忘记了密码...真是的..  后来还是要改了. 不想重新弄什么的了..百度了下怎么改密码...然后就有一篇 ...

  3. vmware 解决 authentication token manipulation error

    vmvare虚拟机长时间未使用,导致再次登录的时候密码忘了,无法登录. 启动时长按shift,进入root(recovery)模式, (recovery mode),进入"Recovery ...

  4. authentication token manipulation error

    用户服务器中修改密码,输入passwd命令后,报错authentication token manipulation error   发生该错误原因是: 1.分区没有空间导致. 2./etc/pass ...

  5. Authentication token manipulation error报错解决办法

    Authentication token manipulation error报错解决办法 #参考http://blog.163.com/junwu_lb/blog/static/1916798920 ...

  6. linux中普通用户修改密码出现(passwd:Authentication token manipulation error)

    如果在linux中,不管是root用户还是普通用户登录后,修改自己的密码,出现---passwd:Authentication token manipulation error---错误的解决办法: ...

  7. 解决:阿里云服务器被植入挖矿程序后修改密码失败的问题(报错:passwd: Authentication token manipulation error)

    如下图,在修改密码的时候会报错 原因: 通常不能修改密码都是/etc/passwd文件或者/etc/shadow文件被锁住了 解决: 检查/etc/passwd文件和/etc/shadow文件是否被锁 ...

  8. Ubuntu忘记用户密码解决方法--Authentication token manipulation error

    1.重启系统,按住shift键进入grub菜单: 2.选择recovery mode恢复模式: 3.在recovery menu中选择root drop to root shell prompt: 4 ...

  9. Authentication token manipulation error for ubuntu ubuntu-16.04.1-desktop-amd64

    https://ubuntuforums.org/showthread.php?t=1772894 Hi, I faced the same problem when I tried to recov ...

随机推荐

  1. Continuous Subarray Sum II(LintCode)

    Continuous Subarray Sum II   Given an circular integer array (the next element of the last element i ...

  2. Redux 洋葱模型理解

    下面的代码会输出: A middleware1 开始C middleware2 开始E middleware3 开始======= G =======F middleware3 结束D middlew ...

  3. Codeforces 555 C. Case of Chocolate

    \(>Codeforces \space 555 C. Case of Chocolate<\) 题目大意 : 有一块 \(n \times n\) 的倒三角的巧克力,有一个人要吃 \(q ...

  4. 【Trie】【kd-tree】计蒜客17122 2017 ACM-ICPC 亚洲区(西安赛区)网络赛 I. Barty's Computer

    题意:2种操作:①往集合里添加一个串 ②给你四个小串a b c d,问你集合里有几个串S满足S=a+S1+b+c+S2+d的形式.S1 S2可以为空,并且a+S1+b=c+S2+d. 就搞四颗Trie ...

  5. 【推导】【分类讨论】Codeforces Round #431 (Div. 1) B. Rooter's Song

    给你一个这样的图,那些点是舞者,他们每个人会在原地待ti时间之后,以每秒1m的速度向前移动,到边界以后停止.只不过有时候会碰撞,碰撞之后的转向是这样哒: 让你输出每个人的停止位置坐标. ①将x轴上初始 ...

  6. Problem D: 程序填充(递归函数):数列2项和

    Problem D: 程序填充(递归函数):数列2项和 Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 2601  Solved: 2117 Descrip ...

  7. Problem F: 加密程序2

    #include<stdio.h> int main() { int i; ]; while(gets(a)!=NULL) { ;a[i]!='\0';i++) if('A'<=a[ ...

  8. WebService基于SoapHeader实现安全认证(二)

    支持通过Http请求方法调用webservice,同时支持SoapHeader验证. using Globalegrow.Common; using Globalegrow.Model; using ...

  9. Sqlserver数据库还原.bak文件失败的两个问题

    一.SQL Server数据库备份还原后,在数据库名称后会出现“受限制访问”字样      解决方案:将数据库限制访问改为:SINGLE_USER 数据库-->属性-->选项-->状 ...

  10. [Linux] 守护进程和守护线程

    对于JAVA而言,一般一个应用程序只有一个进程——JVM.除非在代码里面另外派生或者开启了新进程. 而线程,当然是由进程开启的.当开启该线程的进程离开时,线程也就不复存在了. 所以,对于JAVA而言, ...