Chủ Nhật, 4 tháng 12, 2016

Reset Your Forgotten Root Password On RHEL 7

Sometimes you forget stuff like meetings, seminars,passwords etc. I do. But forgetting a password to a Servers with no easy way to reset it while locked outRedhat servers is one of such systems. If you forget the root password to your RHEL 7 SERVERS, it’s almost virtually impossible to reset it while you’re locked out.

At the boot menu, press e to edit the existing kernel . Then, go to the kernel line (the line starting with linux16) .

Then add the statement rd.break at the end as shown below:
Then press Ctrl-x to start the boot process
Then mount the /sysroot/ in read/write mode. By default it mount as a read only mode.
Then execute the chroot command on the /sysroot partition
Now Change the root password by using the passwd command
Then execte the command as like below
Enjoy with new password.

Không có nhận xét nào:

Đăng nhận xét