6 C
Amsterdam
Friday, December 4, 2020

How To Reset Root Password On CentOS7 and RHEL7

Must read

How To Configure Slave BIND DNS Server On Ubuntu 20.04

In our previous guide we covered the setup of Master(Primary) DNS Server. Here we'll learn that how to configure slave bind dns server on...

Install Fossil on Linux – An alternative to Git

Hello, friends. In this post, we will talk about a serious alternative to Git. In a few words, we'll show you how to install...

How to backup and restore BCD in Windows 10

Hi! Boot Configuration Data (BCD) is a set of data where the system boot information is stored. In addition, from there the operating systems...

How To Install and Configure Master BIND DNS Server On Ubuntu 20.04

Today we are going to learn that how to install and configure Master BIND DNS server on Ubuntu 20.04. As you all know that...
Avatar
Mel Khamlichi
Webmaster and technical Director at Osradar.com Linux/Unix Guru Technology and hardware addicted Location : Amsterdam Netherlands

One of the worst cases in Linux is when you forget your root password and you have no  users with  root sudo privileges to recover the admin password. let me tel you that can be happen even in the big IT companies .

No worry, there is always a solution to reset new password for your Server.

1-Boot menu

On the Grub boor menu , please select last kenel installed, and press  <e>  to Edit

2- Change boot Settings :

Please find line starting with linux16 and find  string ro

3- change  ro to  rw init=/sysroot/bin/sh.

 

4-Control+X to start machine in Emergency Shell

5 – Switch into a chroot jail, where /sysroot is treated as the root of the filesystem tree

chroot /sysroot
6 –Now you can Reset the password.
passwd root
7 – Update selinux information to make this permanent
touch /.autorelabel
8 – Exit chroot
exit

9 – Reboot your system with command reboot

reboot
10- Enjoy the New password :

Cheers!!

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

-

Latest article

How To Configure Slave BIND DNS Server On Ubuntu 20.04

In our previous guide we covered the setup of Master(Primary) DNS Server. Here we'll learn that how to configure slave bind dns server on...

Install Fossil on Linux – An alternative to Git

Hello, friends. In this post, we will talk about a serious alternative to Git. In a few words, we'll show you how to install...

How to backup and restore BCD in Windows 10

Hi! Boot Configuration Data (BCD) is a set of data where the system boot information is stored. In addition, from there the operating systems...

How To Install and Configure Master BIND DNS Server On Ubuntu 20.04

Today we are going to learn that how to install and configure Master BIND DNS server on Ubuntu 20.04. As you all know that...

Diskpart is a very useful tool for managing storage in Windows 10.

Hello! Diskpart is an internal tool included in Windows systems that allows you to manage storage units. Indeed, it is possible to manage internal...
x