RAS Infosystems. Powered by Blogger.

Thursday, 24 September 2015

How to reset root password in centos7



   




Check above video for live example (https://youtu.be/l3gT9UWrO0U)

For Live example please visit our YouTube channel - https://youtu.be/l3gT9UWrO0U
Creating strong password for Linux is much challenging these days. Most of the strong passwords are the combination of symbols, numbers, capital letter etc. More stronger the password more tough to remember. So if you forgot/lost root password of your production server what to do, don't worry these article will help you to reset password without old one. Go through the below steps to reset the password,
Note - Below step are tested with Cent Os 7 in virtual environment.
STEP 1 - Reboot the server and press "e" at the time of kernel selection.
STEP 2 - Press down arrow and find the line with "ro" and change the "ro"               with "rw init=/sysroot/bin/sh" and press "CTRL+x"
STEP 3 - Server going to single user mode bash shell, type                                     "chroot/sysroot" press enter
STEP 4 - Now we can reset the root password, type command 
              "passwd root" and enter your new password 
             (Always create strong passwords).
STEP 5 - Next we need to update SELinux using command                                    "touch /.autorelabel"
STEP 6 - Type "exit" to quit from shell and type "reboot" to reboot the                     server.
Now you successfully reset the root password, you can login with new credentials.

0 comments:

Post a Comment

Sponsers