Recovering Root Password
If you forget your root password, you can easily reset it by entering some options into grub loader when system is being loaded. After system reset, and some bios check, Grub is loaded and there are some choices from which kernel or operating systems to boot.
Debian GNU/Linux, kernel 2.6.18
Press 'e' to enter edit mode.
root(hd0, 2)
kernel /boot/vmlinuz-2.6.18 root=/dev/hda3 ro
initrd /boot/initrd.img-2.6.18
savedefault
Select kernel option and press 'e' key again to edit kernel options. Add init=/bin/bash at the end of line such as,
grub edit>kernel /boot/vmlinuz-2.6.18 root=/dev/hda3 ro init=/bin/bash
Press enter to return back and press 'b' key to boot kernel with these options. System will boot and eventually /bin/bash will run without asking password to login to the system.
mount -o remount, rw /
passwd
Enter new UNIX password:
Retype new UNIX password:
After you change your password successfully, you can "reboot" system normally to use new root password.
- 0 Comment
- Halil Demirezen
- 10 Jun 2008, 14:07
-
You must be login first or sign-up for an account to post comments.
Maybe you should look at these also:
USERBOX
CATEGORIES
MOST READED TODAY
- Creating splitted rar archive files
- Converting MAC dfonts to TrueType
- XFS Filesystem has duplicate UUID problem
- Passwordless sudo setup
- Network interface status with mii-tool
- dropbear rsa key problem
- Calculating SHA Checksums
- Creating self-extracting zip archives for both Linux and Windows
- Disabling ssh password authentication
- ssh X11 forwarding
LAST ADDED
- Routing packets back from incoming interface
- Users with /bin/false shell to login on vsftpd
- Redirecting TCP ports with redir
- Assembly code of a C code
- Network interface status with mii-tool
- dropbear rsa key problem
- Displaying disk io statistics
- Disabling ssh password authentication
- Creating splitted rar archive files
- Creating self-extracting zip archives for both Linux and Windows
