天天看點

linux修改密碼出現:passwd:Authentication token manipulation error

學習linux時遇到更改密碼出現的:passwd:Authentication token manipulation error。在查找資料時看到有部落客的相關講解,是以轉載過來參考學習! 

轉載自:http://blog.sina.com.cn/s/blog_70c9c4b40101ehni.html

如果在linux中,不管是root使用者還是普通使用者登入後,修改自己的密碼,出現---passwd:Authentication token manipulation error---錯誤的解決辦法:

root自己修改密碼失敗

linux修改密碼出現:passwd:Authentication token manipulation error

普通使用者修改密碼失敗

linux修改密碼出現:passwd:Authentication token manipulation error

1.報這樣的錯誤是:密碼:身份驗證令牌操作錯誤,一般是密碼檔案的權限的問題,不過也有可能是根目錄空間滿。

linux修改密碼出現:passwd:Authentication token manipulation error

用lsattr指令檢視存放使用者和密碼的檔案屬性,發現有i選項: (i:不得任意更動檔案或目錄。)是以導緻所有的使用者都不能修改密碼,因為沒有權限允許。

2.我們需要用chattr指令将i權限撤銷,然後再修改,就可以了。

linux修改密碼出現:passwd:Authentication token manipulation error

3.然後在測試root使用者和xiaogang使用者修改自己的密碼。

測試root使用者修改密碼

linux修改密碼出現:passwd:Authentication token manipulation error

測試xiaogang使用者修改密碼

linux修改密碼出現:passwd:Authentication token manipulation error

4.為了安全起見,最好修改完密碼,在把存放使用者和密碼的檔案保護起來。

也用chattr +i /etc/passwd   和 chattr +i /etc/shadow檔案

5.普通使用者修改自己的密碼,是有要求的,密碼必須複雜,并且在密碼字典裡有的字元才能設定

--------------------------------------------------------成功的唯一途徑就是不斷學習!