转自 :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. Spring MVC源码——Root WebApplicationContext

    目录 Spring MVC源码--Root WebApplicationContext 上下文层次结构 Root WebApplicationContext 初始化和销毁 ContextLoaderL ...

  2. mysql中timestamp类型的应用

    在开发过程中我们一般需要记住某条记录的创建时间,在MySQL中如果使用dateTime类型的话,无法设定默认值,我们可以采用timestamp类型来记录创建时间.但是随之而来的有个问题,比如说你的这个 ...

  3. SqlHelper——只因为在人群中多看了你一眼

    对SQLHelper,还是有一点陌生的,但是大多数人都在使用,我就有一种想了解并使用的意愿,于是查了很多资料,发现一片不错的博客,放在下面,作为自己或读者使用的材料. 一.SqlHelper 出场 不 ...

  4. JDK源码学习笔记——LinkedList

    一.类定义 public class LinkedList<E> extends AbstractSequentialList<E> implements List<E& ...

  5. git 推送内容到远程新分支

    之前在做项目的时候,自己想将东西传到远程的一个新分支上.自己开始弄的时候稀里糊涂弄上去的也没搞清楚原理,不过自己后来又去试了一下,发现下面这个方法还可以. (1)在本地的一个目录下,git bash ...

  6. Codeforces Gym 100269B Ballot Analyzing Device 模拟题

    Ballot Analyzing Device 题目连接: http://codeforces.com/gym/100269/attachments Description Election comm ...

  7. CentOS 6.9下KVM虚拟机通过virt-clone克隆虚拟机(转)

    一.virt-clone概述 1.virt-clone作用简介 virt-clone主要是用来克隆kvm虚拟机,并且通过Options.General Option.Storage Configura ...

  8. 修改activityMQ的登录账与密码

    登录下管理员页面,ip根据实际的来 URL : http://127.0.0.1:8161/admin/ 默认账户密码都是admin 账户密码修改在conf文件夹下的jetty-realm.prope ...

  9. HTML5中表单验证的8种方法

    HTML5中表单验证的8种方法 2012-4-21 11:00| 发布者: benben| 查看: 2765| 评论: 0 摘要: 前一篇,我们介绍了HTML5中新的表单特性和函数, 今天就继续来谈谈 ...

  10. jquery中remove()与detach()的区别

    说到删除节点,马上就会想到remove,不过原来还有一个detach,而且它们还是有区别的,就是detach保留了jquery的数据,而remove就会完全删除干净.所以如果在删除一个dom节点后还想 ...