Hi friends,
I want to reset my linux password and misfortunes i don't now how to reset it.Can anyone help me out with this issue.I would be very thankful to that person.
Hi friends,
I want to reset my linux password and misfortunes i don't now how to reset it.Can anyone help me out with this issue.I would be very thankful to that person.
Sure i will help you out with this for that you need to have KNOPPIX LIVE CD and after that follow the below steps:-
Boot the computer with the KNOPPER CD.
Choose the default startup options. Once Knoppix has loaded, press CTRL-ALT-F3. If knoppix fails to boot the gui properly, you can still access the console with CTRL-ALT-F4. The console is sufficient for our needs. You will see a prompt
Now use the following command.
- sudo su [PRESS ENTER]
And the prompt will change to:
root@0[knoppix]#
- dmesg |grep hda [PRESS ENTER]
We are looking for your primary hard drive, on which Linux is installed.
Now we find out on which partition the root of your OS lies.
- fdisk -l /dev/hda [PRESS ENTER]
Normally Linux will probably be on the biggest partition. If the following commands fail on one, try another. Lets assume the root Linux partition is on hda1
- mount /dev/hda1 /mnt/chroot [PRESS ENTER]
This changes your live system to the mounted file system. Now any system command you type are applied to the mounted chrooted system.
- cat /etc/passwd [PRESS ENTER]
Usually the last entry in this file is the systems "sudoer". This is the first user who installed this system. (And thus a member of the admins group). Lets assume the user is named "xyz"
- passwd xyz [PRESS ENTER]
Enter and confirm a password.
- sync
Ensuring all changes are written to disk
- exit [PRESS ENTER]
- reboot
Thanks for replying me but my boot loader is GRUB.
If you are having Grub as your boot loader try to follow the below steps:-
- Select the kernel
- Press the e key to edit the entry
- Select second line
- Press the e key to edit kernel entry so that you can append single user mode
- Append the letter S to the end of the (kernel) line
- Press ENTER key
- Now press the b key to boot the Linux kernel into single user mode
- At prompt type passwd command to reset password:
- You need to mount at least / and other partitions:
- mount -t proc proc /proc
- mount -o remount,rw /
- Change the root password, enter
- passwd
- Finally reboot system.
Bookmarks