| Reboot into a root shell |
|
|
|
If you've lost or forgotten the root password or you've deleted or mangled a critical conf file...
Login to your Linux install as rootSo you've deleted /etc/passwd, /etc/shadow, maybe you've screwed up /etc/fstab eight ways to Sunday, or you've simply forgotten your root password.Keep in mind, anyone with physical access to your server or console can do this if you haven't taken steps to protect it. Physical security is critical. Try this: We'll assume a Fedora installation here, but this works just as well in Debian and others. 1) Reboot. 2) As the system grub-boot loader comes up, hit e for edit mode. 3) Select the line that starts with kernel and hit e again. 4) Go to the end of the line and add init=/bin/bash or init=/bin/sh. 5) Press enter to exit edit mode. 6) Type b to boot with your additional parameters. 7) Once the boot is complete type mount -rw -o remount /. This is important so you can write to the file you seek to change. By default booting this way brings you up in read-only mode. |
| < Prev | Next > |
|---|







