牵着老婆满街逛

严以律己,宽以待人. 三思而后行.
GMail/GTalk: yanglinbo#google.com;
MSN/Email: tx7do#yahoo.com.cn;
QQ: 3 0 3 3 9 6 9 2 0 .

FreeBSD恢复root密码

转载自:http://www.yuanma.org/data/2006/0430/article_341.htm

重新啓動FreeBSD 進入單用戶更改密碼

FreeBSD 4.x 或之前的版本

在系統起動顯示以下信息時按 spacebar

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [kernel] in 10 seconds...

接着在顯示以下信息時輸入 boot -s 

Type '?' for a list of commands, or 'help' for more detailed help.
ok

按 Enter 後系統會運行至顯示以下信息

Enter full pathname of shell or RETURN for /bin/sh:

再按 Enter 進入單用戶, 顯示 #
掛載檔案系統, 輸入 

# fsck -p             
\\文件檔案檢查
# mount -u /          \\掛載 / 
# mount -t ufs -a     \\掛載所有文件檔案

更改密碼

# passwd              \\更改密碼
New password:_
Retype new password:_
passwd: updating the database...
passwd: done
# exit                 \\離開單用戶進入多用戶正常模式


FreeBSD 5 或都之後版本.


在系統起動顯示以下畫面時按 spacebar 選擇 4 按 Enter 進入單用戶模式


                                                                  


系統會運行至顯示以下信息

Enter full pathname of shell or RETURN for /bin/sh:

再按 Enter 進入單用戶, 顯示 #
掛載檔案系統, 輸入 

# fsck -p             \\文件檔案檢查
# mount -u /          \\掛載 / 
# mount -t ufs -a     \\掛載所有文件檔案

更改密碼

# passwd              \\更改密碼
New password:_
Retype new password:_
passwd: updating the database...
passwd: done
# exit                 \\離開單用戶進入多用戶正常模式

 


posted on 2012-01-02 20:17 杨粼波 阅读(807) 评论(0)  编辑 收藏 引用 所属分类: FreeBSD


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理