忘記root密碼怎么辦

centos7.5忘記root密碼怎么辦?相信很多新手小白對此束手無策,通過這篇文章的總結(jié),希望你能使用這個(gè)方法解決問題,以下是解決步驟。?
1、進(jìn)入centos菜單?#快速按上下箭頭?
2、e?進(jìn)入編輯菜單, 此處添加:init=/bin/sh?
3、ctrl +x to start?
4、掛載根目錄:?
mount -o remount ,rw / ;單用戶?/?目錄是只讀的; 需要增加rw權(quán)限;?
5、echo centos |passwd --stdin root?
passwd root?
6、?touch /.autorelabel?更新系統(tǒng)信息?
7、exec /sbin/init?啟動(dòng)?
看完上述內(nèi)容,你們掌握centos7.5忘記root密碼的解決方法了嗎?如果還想學(xué)到更多技能或想了解更多相關(guān)內(nèi)容,歡迎關(guān)注http://www.vecloud.com/資訊頻道,感謝各位的閱讀!
標(biāo)簽: