So you find yourself powering-up that old Ubuntu laptop that you haven't used in several months. Greeted with the login screen, you type in your user id and password once, twice, three times .. uh oh someone forgot their password. What's an Ubuntu user to do? Always keep your password on a sticky note attached to the monitor? No. Always use the word "password" for your password? No. Edit your GRUB session and boot into single user mode? Sure, you can try that, but guess what happens? A nice prompt asks you for the root password anyway. Hey, Red Hat doesn't do that!
What is a self-respecting Ubuntu user to do? Well, editing your GRUB config IS the right way to go - you just have to do it a little differently:
Step 1: Power up the machine.
Step 2: When the GRUB boot loader starts, select "e" to edit the configuration. Select the kernel config line. Instead of adding "1 " or "single" to the end of the line aka Red Hat, add this instead:
"init=/bin/bash"
Step 3: Hit "b" to boot the system.
Step 4: When the system boots and brings you to a command prompt, type this command to mount the root file system: " mount / -o remount,rw"
Step 5: Now you can change the password by typing "passwd" followed by your username, then hit enter. Follow the prompts to change the password for your regular username (not root).
Step 6: Unmount the file system: "mount / -o remount,ro"
Step 7: Now type "sync", hit enter, then type "reboot".
Step 8: After your system boots you should find yourself at the login screen, only this time you can log in with your new password!
Need a more detailed description? Here is the original source that I used when I
Thursday, March 06, 2008
Ubuntu Single User Mode
Posted by
Robert
at
9:00 PM
Labels: linux ubuntu
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment