We have a Production Server running (RHEL 6.5) .We have 2 sudo users and root user. For installing monitoring agents we should have root access but we have lost the root user password. Would anybody tell me how to reset the root user password without reboot because the server in production environment.
Any Help would be appreciated
Use the user that has "sudo" access and run:
sudo passwd root
Thanks for your reply......
but my sudo users doesn't have privileges to reset the root user password
What privileges the sudo users have? Can they edit the /etc/shadow file?
If you did not define some root privileges for normal user ,you can not change password of root other than try and try to guess root password...
@MarinT sudo users couldnot edit /etc/shadow file
Thanks for your valuable suggestions
I think the last chance is to hack your own system if possible... Search the web for an exploit then copy it to your server and compile it and execute it... However I think it's the worst way especially for an operational and sensitive server therefore I prefer to reboot the server and bring it up in single user mode...
I don't think that we can able to reset root password without reboot and I am damn sure isn't any way. The only solution is to switch to single user mode and reset the root password
As you said it is a production server,we cant appreciate using exploit. However,I will try this on my personal Workstation.
Yes, We had got the Downtime from the Customer. And Reset the Password through the single user mode.
Thanks for your comments, ravi
list out the sudo privilages which assigned to user
login with user which have sudo privileges and type "sudo su -" give the user password now you can run "passwd root" change the password.......