ubuntu,忘記了密碼

系統:Ubuntu10.04ubuntu

1)重啓ubuntu,隨即長按shirft進入grub菜單; bash

2)選擇recovery mode,按"e"鍵進入編輯頁面; ide

3)將ro single替換爲rw single init=/bin/bash;(ubuntu10.10 不用改,改不了) 3d

4)按ctrl+x進入單用戶模式,當前用戶即爲root;(普通用戶登陸也行) blog

5)到/etc目錄下修改sudoers權限:chmod 0440 sudoers,搞定;也能夠同時新增root密碼,下次就不這麼麻煩了; grubget

6)按ctrl+alt+del重啓;it

相關文章
相關標籤/搜索