LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Locked out of root (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/locked-out-of-root-536789/)

amonty 03-12-2007 07:35 AM

Locked out of root
 
Hello,

I know I did something silly. :tisk: I have not configured a second user apart from root on my Fedora Core 6 running on my laptop (Compaq/HP Presarion V3133AU).

While I was at on it yesterday I clicked on automatic updater of Fedora. This was running for a very long time and end of day decided to kill the process. I clicked on force quit to the updator. Now once I have rebooted the machine I have been locked out of my machine.

My root password does not work anymore. I am assuming it is because of the update that was halfway through updating file. But does it in any way impact my /etc/passwd or /etc/shadow files? Well I do not know the answer and any help on this would be greatly appreciated. :scratch:

Cheers,
Monty

jtshaw 03-12-2007 07:42 AM

If you boot into single user mode you can reset your password.

This can by hitting e on your grub menu with your desired kernel, selecting the kernel line on the next screen and hitting e again, adding "single" (without the quotes) to the end of the line, hitting enter, and then typing a b to boot the thing.

You will get dropped at a shell prompt where you can set your password using passwd. Then exit the shell and regular bootup should continue.

This is why I always use a grub password... and don't allow just anyone physical access to my machine:)

For more info on how to get around in grub (and just in case those keystrokes I gave you weren't 100% correct... did it from memory as I don't currently have a linux box I can reboot) check out the Grub Manual.

jtshaw 03-12-2007 07:46 AM

A follow up... once you realize what you are capable of doing from the Grub user interface it will probably concern you that others are capable of doing so as well. However, being the nice folks that they are, the grub developers did include a fairly reasonable password interface....

Details are in the Secuity Section of the Grub manual.

amonty 03-13-2007 05:04 AM

"jtshaw", thank you very much for the help. I think I will use the Grub method you have outlined. I think I have not implimneted shadowing, if I have then it might not be easy to change the password by directly editing the shadow file. Whats is your point of view on this?

Cheers,
Monty

jtshaw 03-13-2007 09:25 PM

Shadow is certainly good... but beware that in single user mode you are logged in as root and not required to enter the previous password to change the current with the passwd utility.


All times are GMT -5. The time now is 07:39 AM.