解決"authentication token manipulation error"

 

  昨天安裝是Ubuntu Server. 配置好了幾個軟件後就忘記繼續了...今天打開,竟然忘記了密碼...真是的..
  後來仍是要改了. 不想從新弄什麼的了..百度了下怎麼改密碼...而後就有一篇文章說是在進入系統前進入高級模式..而後裏面有root的單用戶模式..-----kohna,

1).在啓動項選擇:Advaned options for Ubuntu. 
2).而後 選擇:Ubuntu ,with Linux 3.13.0-24-generic (recovery mode),
3). 等待加載完成..你將看到"Recovery Menu (filesystem state :read-only)"
4).選擇root              Drop to root shell prompt 就會進入單用戶模式了..

而後是修改密碼.
輸入passwd user,回車後就出現 
 authentication token manipulation error.
passwd unchanged..

接下來我就在不斷的嘗試....
找了不少文章看...CSDN,網易的什麼都有

後來找到了一篇外國人寫的... 
  http://linhost.info/2013/08/passwd-authentication-token-manipulation-error-ubuntu/

You probably encountered this error while trying to reset the password on a Ubuntu system.linux

 root@u13-04:~# passwd nyuser 
 Enter new UNIX password: 
 Retype new UNIX password: 
 passwd: Authentication token manipulation error 
 passwd: password unchanged

 

This is the result of trying to work on a file system while mounted as read-only. The solution is a simple one. Before making changes to the users password mount the filesystem as read-write which allows for the necessary changes to be made.
 shell

mount -o rw,remount /


Now try to change the users passwords again.ubuntu

root@u13-04:~# passwd nyuser Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
 
關鍵代碼是:mount -o rw,remount / .
輸入後就能夠改了..注意..輸入後什麼也不會提示.
 

Ubuntu 14.04中root 密碼忘記解決方法bash

方法一ui

若是用戶具備sudo權限,那麼直接能夠運行以下命令:this

#sudo su rootspa

#passwdblog

#更改密碼token

或者直接運行sudo passwd root命令就能夠直接更改root密碼。ip

有關sudo su的區別:

1.共同點:都是root用戶的權限;

2.不一樣點:su僅僅取得root權限,工做環境不變,仍是在切換以前用戶的工做環境;sudo是徹底取得root的權限和root的工做環境。

Ubuntu 14.04中root 密碼忘記解決方法

www.linuxidc.com@linuxidc:~$ sudo su root
[sudo] password for www.linuxidc.com: 
root@linuxidc:/home/www.linuxidc.com# passwd
輸入新的 UNIX 密碼: 
從新輸入新的 UNIX 密碼: 
passwd:已成功更新密碼
root@linuxidc:/home/www.linuxidc.com#

方法二

若是用戶不具有sudo權限,則方法一不能用,並需進入GRUB修改kernel鏡像啓動參數。本文使用的Ubuntu版本爲14.04.4,具體過程以下爲:

一、重啓電腦長按shift鍵直到進入下圖進入GRUB引導模式,選擇第二行Ubuntu 高級選項, 選中直接回車 ,以下圖:

Ubuntu 14.04中root 密碼忘記解決方法 

二、進入以下畫面,看到裏面有一些選項,這時千萬不要按回車鍵,按e進入(recovery mode) 編譯kernel進行啓動參數

Ubuntu 14.04中root 密碼忘記解決方法

三、關鍵的時候到了, 倒數第四行,會看到一行Linux /boot/vmlnuz-4.2.0-27-generic .......ro recovery nomodeset,

刪除recovery nomodeset

Ubuntu 14.04中root 密碼忘記解決方法

三、而後再剛纔刪除的後面添加 quiet splash rw init=/bin/bash。而後按F10, 啓動。

Ubuntu 14.04中root 密碼忘記解決方法

4 若是一切爭取,運行後系統直接進入root mode,輸入:passwd,系統會提示你輸入新的密碼,結束。

Ubuntu 14.04中root 密碼忘記解決方法

相關文章
相關標籤/搜索