Solved

unable to change root directory to /mnt/sysimage(chroot /mnt/sysimage) in Rescue mode

Posted on 2007-03-24
3
4,063 Views
Last Modified: 2008-01-09
I have forget the redhat6.2 passsword,now i go to rescue mode and type command
chroot /mnt/sysimage but it is showing me error....
"cannot change root directory to /mnt/sysimage:No such file or directory"
Plz help me to change the root password.

Manish
0
Comment
Question by:manishsaxena2007
3 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 18787248
Could you boot into single user mode without root password?

If you are using LILO, specify one of these options at the LILO boot prompt (if you are using the graphical LILO, you must press [Ctrl]-[x] to exit the graphical screen and go to the boot: prompt):

boot: linux single

Then at shell prompt "#", type
passwd root   (to reset the password)
0
 
LVL 11

Accepted Solution

by:
kblack05 earned 250 total points
ID: 18809481
You'll need to mount the filesystem first. In that version of Redhat I'm not sure there was a dialog promt to do this. Firstly use fdisk to see which is the master partition, on many this is /dev/hda2, but use fdisk -p to be sure (make sure not to write with FDISK you don't want to modify the partitions, only view them *man fdisk*)
If it is an ext3 filesystem you would do (modify to ext2, or use without '-t' if not)

mount /dev/hda2 -t ext3 /mnt/filesystem
(you may need to mkdir /mnt/filesystem on older kernels)

chroot /mnt/filesystem

passwd
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
Fine Tune your automatic Updates for Ubuntu / Debian
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now