O'Reilly logo

Linux® For Dummies®, 8th Edition by Richard Blum, Dee-Ann LeBlanc

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

“Aaargh! I Forgot My Root Password! What Do I Do?”

Fear not. You have a way around this problem! You need to boot into single-user mode, which you can accomplish by rebooting your machine. When you see the blue screen with the words “Press any key to enter the menu,” press a key. At the GRUB boot screen, press E, which takes you to a configuration file. Use the arrow keys to go to the line starting with kernel, and press E again to edit that line. At the end of the line, add the word single, press Enter to put the change into place, and then press B to boot the machine.

Type passwd and then enter the new password twice as directed. When you finish, type exit and then boot the machine normally.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required