13 replies
by bfilmfan
You aren't the only person that has had that pleasure. Lots of help here:
by vdanen
This is very easy to do. Reboot or start your computer with the
install CD or a downloadable Live CD. If the CD has it, boot into
rescue mode (ie. Mandrakelinux CDs let you boot into rescue
mode). You should then be able to mount your partitions,
although you really only need to mount your / partition. For
instance, if /dev/hda2 was your / partition, you might mount it
as /tmp/cdrom or /mnt/cdrom or something by doing "mount /
dev/hda2 /tmp/cdrom"; depending on the distro you may need
to pass the fs type to mount (ie. "mount -t reiserfs /dev/hda2 /
tmp/cdrom"). Anyways, once this is done type "chroot /tmp/
cdrom" and then you'll be chrooted (or jailed, locked into) your /
filesystem. Make sure you're doing this as the root user! Once
you've done that, you can just type "passwd [user]" or "passwd"
(to change root's pw) and reset your password.
by jopoy
What boot loader are you using?
If you are using LILO:
At the boot loader options type "linux single"
If you are using GRUB:
observe the kernel parameters, just change the init option at the end of the boot options/parameters to 1. (It's been a long time since I rebooted so please bear with me)
This will boot you to single user mode. You will then be able to user "passwd" to change your password. If all else fails, try searching google with the string "how to boot linux in single user mode"
hth.
by mullapudi3
1)While booting at botrecord press e to edit
2)u can see the kernel-hd0
by moving the arrows highlight that and then press enter
3)now press space bar once at type single then press enter
4)press b to boot
5)you will get sh#
6)type passwd root
type new password
retype password
7)type reboot to boot again
by alokchauhan1
by ben
by csturman
by jdclyde
I will assume you have physical access, as this can't be done remotely and if you don't have access you have no business getting on.
http://aplawrence.com/SCOFAQ/FAQ_scotec1root_1.html
How do I reset the root password if I forget it? (part 1)
This procedure will work for Xenix, and for Unix as well if you are using a very relaxed security level (one which stores encrypted passwords directly in /etc/passwd). If you're using a higher security level on Unix, look for part 2 below.
For Linux, see http://www.aplawrence.com/Linux/lostlinuxpassword.html
For Unixware 2.12, http://aplawrence.com/Bofcusm/2438.html adds some useful info.
Boot the system from your emergency boot diskettes (if you didn't make these and keep them up to date, shame on you, but you should be able to use N1/N2 instead, and see the entry on crashing out of these diskettes below). Next,
mount /dev/hd0root /mnt
; this will mount your hard drive's root filesystem on /mnt.
On some v5.0.x systems, /dev/hd0root won't exist. Create it with
mknod /dev/hd0root b 1 42
See also http://aplawrence.com/cgi-bin/ta.pl?105094
Edit /mnt/etc/passwd. The first line will be your root line, such as
root:encryptedpasswordgoeshere:0:0:God,Everywhere:/:/bin/sh
Edit out the encrypted password (don't touch anything else!) so that the line reads something like
root::0:0:God,Everywhere:/:/bin/sh
Save the file and shut down. Reboot from the hard drive. Your root password has now been removed, and you can reset it normally.
First login to single mode user to do that:
press e for edit .
then type sigle at end of the line and press b to boot.
After that it will boot in single mode type passwd.It will ask for a new root passwrd .Then type init6 to restart.
by susantaroul
by meanoleman
Lost root passwd
I'll take the privilige provided by the author of this great howto and share it.
I can verify it works on my CentOS-5 and every Fedora I've tried it on.
by meanoleman
I'll take the privilige provided by the author of this great howto and share it.
I can verify it works on my CentOS-5 and every Fedora I've tried it on.
This discussion is closed to new replies.
Trending Linux posts
Sort by Trending