how to change root password without knowing the grub password
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to change root password without knowing the grub password
hi friends is there anybody who knows how to change the root password or get the root level access without knowing the root password and also i don't know grub password also and one thing more rescue environment is also not working. but i have physical access to my machine.
please let me know if anybody knows the solution.
all the solutions and suggestions will be appreciated.
You would need to access the root partition with a rescue disk or a live distro so that you bypass the grub password. Then mount the root partition and zero the root password. Reboot and su to root (no password now) and run "passwd" to change it.
Boot from any live CD, and mount the Linux partition which contains /etc. Edit the "passwd" file to remove the first "x" in the entry for root. The new entry will look something like this:
root::0:0:root:/root:/bin/bash
You will now be able to log in as root with no password.
While you are at it, you can edit /boot/grub/menu.lst to disable the GRUB password
thanks for giving me the solution but i have one more problem is that rescue environment is not working also what will be the sol. now
i have only admin user access plz tell me if u have any idea in yr mind.
Thanks & regards
Ramesh Kumar
Quote:
Originally Posted by jschiwal
You would need to access the root partition with a rescue disk or a live distro so that you bypass the grub password. Then mount the root partition and zero the root password. Reboot and su to root (no password now) and run "passwd" to change it.
What do you mean by the rescue environment not working? your description is too vague. Rescue environment is when you boot to the 1st installation cd of your os and when it prompts you to enter a mode for installation; you type in "linux rescue" and then just follow the instructions.
i got the the solution man by theway thanks a lot for giving me such suggestions.
byee
Quote:
Originally Posted by pixellany
Boot from any live CD, and mount the Linux partition which contains /etc. Edit the "passwd" file to remove the first "x" in the entry for root. The new entry will look something like this:
root::0:0:root:/root:/bin/bash
You will now be able to log in as root with no password.
While you are at it, you can edit /boot/grub/menu.lst to disable the GRUB password
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.