差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

tech:linux_rootpasswd [2011/05/09 08:06] – 建立 jonathantech:linux_rootpasswd [2011/05/09 08:08] (目前版本) jonathan
行 1: 行 1:
 +====== 忘記 CentOS root 密碼 ======
 +===== 使用 Single 模式啟動 CentOS =====
 +  - 啟動時的 grub 畫面按下 e 進入編輯模式
 +  - 選擇 kernel /vmliz ... 項目進入編輯
 +  - 在參數最後增加 **single** 然後按下 [Enter]
 +  - 回到 grup 啟動選單按下 b 啟動剛剛編輯的這項
 +  - 啟動後出現 # 進入 Single 模式
 +
 +===== 更改 shadow 檔案屬性 =====
 +  - 執行 <code sh>chattr -i /etc/shadow</code> 解開保護 /etc/shadow 權限
 +  - 執行 <code sh>passwd root</code> 更改 root 密碼
 +  - 更改成功後輸入 exit 重新啟動
 +
 +===== 參考網址 =====
 +  * http://wangchihwei.blogspot.com/2010/05/centos-root.html
 +
 +{{tag>linux tips 密技}}
 +
 +