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 READ TODAY
- Redirecting tcp / udp ports with socat
- Syntax highlighting in less
- Disabling reverse dns lookups in ssh
- Passwordless sudo setup
- Users with /bin/false shell to login on vsftpd
- Scp resume
- Using lsof utility
- dropbear rsa key problem
- Enabling remote desktop on a VirtualBox Machine
- XFS Filesystem has duplicate UUID problem
LAST ADDED
- Using iPhone internet sharing over bluetooth under Linux
- Using USB sound card with amarok
- Multi-conditional search and replace (clearing a ftp trojan script example)
- Disabling ipv6 functionality
- How to convert a mp3 file
- How to choose the fastest Debian mirror
- Disabling reverse dns lookups in ssh
- Rewriting destination ip address
- Deleting A File By It's Inode Value
- Learning which libraries are used for a binary
