Monday, August 25, 2014

Resetting root password in Red Hat and CentOS 7

This process was a bit confusing and according to the official Red Hat documentation, has a few missing steps. I found the answer from another blog and this helped finally get to the real fix. Note, this is tested on CentOS7 on a VMware Workstation Virtual Machine.

 1. During the boot process, press the E key at the Grub2 menu.

2. Scroll down using the arrow keys (not the Vi method) to the line starting with "linux". It would look like this "linux16 /vmlinuz-3.10.0..."

3. Remove the following entries from that line, "rhgb" and "quiet". If you leave these, they mess up the console and do not allow a password more than one character.

 4. Add the following to the end of the line.


5. Press ctrl+x to continue the boot process.

 6. Once the system is booted, you will be at the root user in single user mode. But this is a read only file system. Validate this by using the following command. This should fail. # touch /tmp/test

 7. You need to mount the / filesystem. Use the command as follows.

 # mount -o remount, rw /

8. Test again that you can write to / after the remount.

# touch /tmp/test

 9. Change the password for root.

 # passwd

 10. Touch the following file as a fix file process. This is for SELinux.

 # touch /.autorelabel

 11. Finally start the normal boot process. In some references you can use the reboot command but in my testing, it was not as stable.

 # exec /sbin/init

 12. Now login with the new password!

Saturday, August 23, 2014

Coming back to my blog and my exam path

It's been a while since I updated this blog but wanted to keep people updated on my work and learning. Right now, I'm focusing on the Red Hat RHCE exam. About the end of 2012, I studied for the Red Hat RHCSA exam, which is the beginner exam focusing on the Red Hat Linux distro. The exam while difficult was a very good learning experience for myself, considering I'm still pretty new to the Linux world. Since the certification is only valid for three years, I'm working on the next certification level, the RHCE. This exam is much harder and going to be more of a challenge for myself. The last exam I was able to self study but I really feel that I would greatly benefit from taking the official training class, especially since my work is offering to pay for it. The downside is I won't have the time to full prepare to pass the exam 100% but at least it's going to be five days of asking questions and at least getting to take a exam (even if I fail). In other notes, I started up a site for the RHCSA and after it was abused by spammers, removed the entire MediaWiki install. It was painful but going to be an excuse to start it up again and remove all Red Hat trademarks from the site, just incase.

Monday, June 23, 2014

It's been a long time

This blog hasn't seen much attention in the past two years. Mostly I've been focusing on work and personal life, plus learning as well. Right now my focus on work is moving from system administration to more knowledge of scripting and operational tools. In the next few weeks, I'll start up posting my tutorials and also add more to certification study paths.