Translate

Friday, August 8, 2014

Get into Single User mode in RHEL/CentOS 7 : Retrieve Root Password in RHEL/CentOS 7

The Redhat recommended way of doing this changed in Redhat 7. I discovered this while reading a forum in Linkdin. It's on pp 406-407 of the new System Admin guide on the Redhat site. It's basically the same, but some things have been added:

- Interrupt the boot and edit with 'e'.
- Add init=/bin/sh to the end of the 'linux' line. Additionally, REMOVE the 'rhgb' and 'quiet' parameters from the 'linux' line. If you don't you probably won't be able to type on the console. That's what happened to me the first time.
- Ctrl+X to boot.
- / is read-only so remount the root filesystem: mount -o remount,rw /. If you don't do that you will get token manipulation errors.
- Use the passwd command to change the password.
- touch /.autorelable to take care of selinux. I've skipped this step before and was then unable to boot.
- run the following: "exec /sbin/init 5" and bring the system up. I don't know why you need the 'exec' command, but you do. Do not try to reboot it until it comes up the first time. It will hang and your changes may not be synced. I guess you could go to run level 3 as well.

Thanks Jim Caron for helping out Fourm.

4 comments:

  1. This is the best place where we can get good collection of information with very useful content, thanks much for sharing here...
    Best Online Software Training Institute | Unix Linux Training

    ReplyDelete

  2. Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing the information .Hope more posts from you .I also want to share about best linux training videos and in recent times also linux training videos

    ReplyDelete
  3. You have provided a nice article, Thank you very much for this one. And I hope this will be useful for many people. Salesforce Training India 

    ReplyDelete
  4. It's very useful article with informative and insightful content and i had good experience with this information.Enroll today to get free access to our live demo session which is a great opportunity to interact with the trainer directly which is a placement based Salesforce training India with job placement and certification . I strongly recommend my friends to join this Salesforce training institutes in hyderabad practical course, great curriculum Salesforce training institutes in Bangalore with real time experienced faculty Salesforce training institutes in Chennai. Never delay to enroll for a free demo at Salesforce training institutes in Mumbai who are popular for Salesforce training institutes in Pune.

    ReplyDelete

About Me

My photo
Greetings Friend! I am Linux scholar, trying to learn as much I can and share it with you. I am in mid of my Professional Career. Doing Good. :)

Followers