Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Reset Root Password

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
bluesdog
Posts: 2077
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada
Been thanked: 1 time

Reset Root Password

#1 Post by bluesdog »

Forgot, you l33t haxx0r you?

Don't panic.

Boot to the GRUB menu. Then, press <e> (for edit) before Linux has a chance to boot.

Using your keyboard arrow keys, move the cursor down a line or so, and press <e> (for edit) again, you should now be on the kernel line, and press <End> to go out to the very end of that line. Now hit the spacebar once, if necessary, to add a space, and then add one of the folllowing:

Code: Select all

 init=/bin/bash
Or:

Code: Select all

 init=/bin/sh
Then press <Enter>, and you're back at the kernel line, press <b> (for boot) and the computer will proceed to boot to a root prompt.

At this point, the root file system is still mounted read-only, so enter the following command:

Code: Select all

mount -n -o remount,rw /
Then type:

Code: Select all

passwd
Enter your new password. Retype if asked to confirm.
Then restart the machine by typing:

Code: Select all

 reboot
Now you should be able to login with your new root password as required.

marshcast
Posts: 2
Joined: 2011-04-22 12:21

Re: Reset Root Password

#2 Post by marshcast »

Top howto Bluesdog

- Elegence ;)

User avatar
Thailipo
Posts: 22
Joined: 2011-05-09 03:38

Re: Reset Root Password

#3 Post by Thailipo »

So... basically, filesystem encryption and requiring a password for login are completely useless measures against someone with physical access to the computer?

From a security standpoint, this little trick worries me.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Reset Root Password

#4 Post by dasein »

Thailipo wrote:So... basically, filesystem encryption and requiring a password for login are completely useless measures against someone with physical access to the computer?
Anyone with physical access to the machine can read unencrypted data. But that's exactly why filesystem encryption is important if you have sensitive data to protect.

But yeah, login passwords on desktop machines are basically just for show. After all, you can boot from a USB stick or rescue CD, and the machine is "yours."

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Reset Root Password

#5 Post by dilberts_left_nut »

This can be controlled by disabling other boot methods in the BIOS and setting BIOS & GRUB passwords.
But then, opening the case and resetting the BIOS, or just pulling the HDD and reading it in another machine works too.

As stated, filesystem encryption is the only way to protect data if "the enemy" has unrestricted physical access to the box.

In most situations the above methods are sufficient to deter opportunists.
AdrianTM wrote:There's no hacker in my grandma...

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Reset Root Password

#6 Post by dasein »

dilberts_left_nut wrote:But then, opening the case and resetting the BIOS, or just pulling the HDD and reading it in another machine works too.
Perzactly.

Absent physical security measures, passwords really aren't much of a deterrent, except against the idly curious. Encryption is the only solution for a physically insecure machine.

geazzy
Posts: 27
Joined: 2011-07-02 05:39

Re: Reset Root Password

#7 Post by geazzy »

nice how to bluesdog :D

Post Reply