問題:
輸入命令su root,輸入密碼怎么輸入都不正確。
原因:
因?yàn)閯偘惭b好的Linux系統(tǒng)是沒有給root設(shè)置密碼的。
免費(fèi)學(xué)習(xí)視頻教程分享:linux視頻教程
解決方法:
首先輸入以下命令:
sudo passwd root
[sudo] password for sam(用戶名): 輸入當(dāng)前登陸liunx用戶名的密碼
Enter new UNIX password: 輸入新的密碼并確認(rèn),此時(shí)的密碼就是root新密碼
Retype new UNIX password: 再次確認(rèn)root新密碼
彈出:passwd: password updated successfully(已成功更新密碼)
然后進(jìn)入root權(quán)限即可,如下:
su root
切換到普通用戶,如自己配置的用戶名為sam
su sam
相關(guān)文章教程推薦:linux教程