METHOD 1
===================================================
HOW TO RESET UR ROOT PASSWORD IF U FORGET IT
Recovery from an unknown root password
This document contains a Red Hat and SUSE example of recovering from an unknown root password.
On Red Hat
Red Hat systems do not ask for a root password when booting in single user mode. On powered off
Red Hat systems the procedure is:
1 Boot the computer
2 Use ‘e’ in the GRUB boot loader (First press
3 Use ‘e’ to edit the kernel boot option
4 Type ‘
5 Select ‘b’ to enter single user mode
6 Use the passwd command. You now have a new root user password.
One way to prevent this simple root password recovery method, is to add a password to GRUB.
This procedure will not work on all distributions, because other systems tend to ask a root password
for entering single user mode.
Another way to recover from the unknown password is to use rescue mode (also see the following
objective).
On other systems
On powered off (SUSE) systems the procedure is:
1 Boot the computer from the install CD (or rescue diskette)
2 Choose Rescue System from the boot options. You will be the root user of the booted system
without being prompted for a password.
3 Mount the / partition of the installed system, e.g.:
o mount /dev/hda1 /mnt
4 Make the mounted (installed) system the new root (/) system and change the password of the root
user, e.g.:
o chroot /mnt passwd
You changed to the installed root system and used the passwd command to create a new password
for the root user.
The command chroot /mnt would make the change to the installed system more permanent. E.g. you
can change /etc/fstab, /etc/inittab, /boot/grub/menu.lst (The SUSE version of the boot menu
grub.conf), which are on the installed system until you use the exit command.
If you do not use the chroot command, then you would alter the files of the rescue system and not the
files of the installed system.
The Red Hat rescue system is similar to SUSE but uses the command chroot /mnt/sysimage
Note:
Deleting the x in the /etc/passwd file of the root entry, removes the password protection for root.
An alternative way to recover from an unknown password is:
– Using a boot CD or USB stick
– Mount the hard disk
– Remove the x
– Restart the system
– Login without a password
Think of a way to enable the password again and if you want to protect your notebook for these
actions: Use an encrypted file system (for / or your data partition).
http://wiki.novell.com/index.php/Roberts_Quick_References
While Booting ( Redhat ) just press "e" in GRUB
u will find 3 lines of code..
Goto to the 2nd line press "e"again and type "1" in the end
then press ENTER..
Then press "b" and it will boot you into your shell..
Just type "passwd" and change ur ROOT password...
dont need to know the old one..
===================================================
METHOD 2
===================================================
"I, uh, forgot the root password"
Let's look at recovering the root password from the boot loader. If you're using GRUB, then, as GRUB loads up, highlight the Red Hat Linux entry on the GRUB menu and then press [E] to edit the boot configuration. Locate the following line, something that looks like this:
kernel /boot/vmlinuz-2.4.20-0.70 root=LABEL=/hdc=ide-scsi
Type the number '1' at the end. Doing so boots the PC into run level 1-single user mode, where you're automatically logged in as root. This done, type 'passwd' at the prompt. You can enter a new password here.
===================================================
METHOD 3
===================================================
Question.
we can crack the root password and GRUB password, if there is no Grum password, from the initial screen (i.e. from the init 1); but with the GRUB password. While reading LinuxForYou, I saw your section and thought you may be able to help.
Answer.
To break the GRUB start-up password, follow the steps given below:
1. Boot the system with the first Linux CD. At the boot prompt, type linux rescue to switch to rescue mode. In rescue mode you will be asked if similar steps should be followed, which need to be followed in the installation. Once you get the # prompt, type the following command:
# chmod /mnt/sysImage
2. Edit the grub.conf file and remove the passwd line from the file. Save the file and exit.
3. Once your machine reboots, you will be able to start your Linux OS in the usual manner.
============================================================================
No comments:
Post a Comment