Linux系統清除登入密碼和Grub密碼的方法

來源:互聯網
上載者:User

簡單的整理一個,省得重裝系統。

這裡還有篇寫的比較全的:

http://hw.lipengjie.blog.163.com/blog/static/133603378201052461035727/

 

# LINUX清除登入密碼:[單一使用者模式]

 1、進入單一使用者模式
進入登入選項:按e鍵編輯登入項,在文本的末尾空格加 “1“

2、按b重啟

3、修改/etc/passwd檔案,刪除root的密碼

root:x:0:0:root:/root:/bin/bash

刪掉這裡的x

4、由單一使用者模式下:init 5進入圖形模式

 

# LINUX清除登入密碼:[光碟片引導]

1、光碟片引導系統,按F5,進入修複模式

2、輸入 liunx recuse 按Enter

3、進入 cd /mnt/sysimage/

4、進入 etc/...修改系統檔案,<注意不是/etc>
vim etc/passed

5、刪除root的密碼

root:x:0:0:root:/root:/bin/bash

刪掉這裡的x

 

# LINUX清除Grub密碼:

vi etc/grub.conf
刪除這一行: "password --mdi"

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.