cancel
Showing results for 
Search instead for 
Did you mean: 
  • 2,967 Views

linux user password

Can we recover root user password if we forget in real time environment?

 

0 Kudos
4 Replies
Rodolfo
Flight Engineer Flight Engineer
Flight Engineer
  • 2,965 Views

Yes, you can always regain control of the root password. What you probably can't do is discover the current root password.

But for every Operating System and version, there is a way to set a new root password.

You may want to check online, for your specific OS/version, you will find plenty of solutions out there. Is a  red hat box you want to recover the password?

Thank you

Rodolfo


Rodolfo
Red Hat Instructor
0 Kudos
LLRobinson
Flight Engineer
Flight Engineer
  • 2,929 Views

Wellll, I'd hazard that if you also passworded your grub menu and encrypted your root partition disk and then lost all those passwords too, that would be genuinely unrecoverable.

Head in Cloud
0 Kudos
Sillihkram
Flight Engineer
Flight Engineer
  • 2,917 Views

if /etc/sudoers is configured with NOPASSWD:ALL for any user on the system Then to overwrite the root password just run:

sudo -i

passwd

Password Recovery/Discovery is more difficult, You can try using brute force utilities like Hydra or Medusa

but those tools require a good password list and a lot of processing power.

0 Kudos
americanada
Flight Engineer Flight Engineer
Flight Engineer
  • 2,902 Views

If you have access to the console, resetting the root password is not very difficult, and involves (for RHEL7) using methods such as "rd.break" during the boot sequence, remounting the file system, and forcing a SELinux relabel.

If you do not have access to the console, I would imagine resetting root to be very difficult if not impossible.

 

0 Kudos
Join the discussion
You must log in to join this conversation.