- 1、本文档共5页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
CentOS 单用户模式重置密码
For CentOS 6.x 5.x
Way 1:
CentOS-6 Note: Due to an upstream SELinux bug the root password cannot be reset on a fresh install of CentOS-6
without an additional step. Booting with selinux=0 appended to the grub kernel line, or doing setenforce 0 after
logging in and before attempting to reset the password are work-arounds. This is corrected by applying already-released
errata updates.
Cautious: We urge to take backup of your data and try it out at your own risk.
STEP 1. Boot Computer and Interrupt while booting at GRUB stage hitting ‘arrow‘ keys or “space bar“.
STEP 2. Type ‘a‘ to modify kernel argument. Anytime you can cancel typing ‘ESC‘ key.
STEP 3. Append 1 at the end of “rhgb quiet” and press “Enter” key to boot into single user mode.
STEP 4. Type command “runlevel” to know the the runlevel where you are standing. Here “1 S” state that your are in a
single user mode.
STEP 5. Type ‘passwd‘ command without username and press ‘Enter‘ key in command prompt. It’ll ask to supply new
root password and re-type the same password for confirmation. “Your are Done” Congratulation!!!
What if GRUB bootloader is password protected? We’ll cover in our next article, how to protect GRUB with password
and reset the same. Stay tuned…
If you find this article is helpful, or you may have some comments or query about it please feel free to contact with us
through below comment box.
Way 2
1. Boot or Reboot your CentOS installation
From the console ATL+CTRL+DEL will get you headed in the right direction.
2. Press Any Key
After the installation reboots, it will come up to a boot countdown. Here, you can press any key, I
dont have one either, but any other key works also.
This will bring you to the GRUB menu.
3. GRUB Menu
From the GRUB
文档评论(0)