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. 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
  3. Thanks for giving great kind of information. So useful and practical for me. Thanks for your excellent blog, nice work keep it up thanks for sharing the knowledge.

    python Training in chennai

    python Course in chennai

    ReplyDelete
  4. The King Casino Company - Ventureberg
    It ventureberg.com/ was born worrione in 1934. The Company offers https://deccasino.com/review/merit-casino/ luxury hotels, 바카라 사이트 If you don't have a poker room in your house, then you'll find a poker worrione room in the

    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