當執行以下指令切換為 root 使用者時,提示 su: Authentication failure
su root # 然後輸入密碼
出現這種問題的原因有兩個:
一、輸入 root 的密碼真的錯誤了
二、那麼肯定是新裝的 Ubuntu 系統
不管哪種情況,我們隻需要執行以下指令重新設定 root 密碼即可:
sudo passwd root # 輸入此指令,并回車
[sudo] password for peng: # 輸入目前使用者的密碼
New password: # 輸入 root 使用者新密碼
Retype new password: # 重複輸入确認密碼
passwd: password updated successfully # 出現該字樣代表修改成功
然後繼續執行 su root 并回車,然後輸入對應的密碼即可。