Solved

cannot change root directory to /mnt/sysimage in Rescue mode

Posted on 2007-03-24
4
3,639 Views
Last Modified: 2013-12-04
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
  • 2
4 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 18787263
Base on Red hat 6.2 manual, there is no /mnt/sysimage in rescue mode.
Please check the following manual:
http://www.redhat.com/docs/manuals/linux/RHL-6.2-Manual/ref-guide/s1-sysadmin-rescue.html

to mount your "/" directory to somewhere like
# mkdir /tmp/root
# mount -t ext2 /dev/hda5 /tmp/root  <=== assume /dev/hda5 is your "/")
0
 

Author Comment

by:manishsaxena2007
ID: 18788612
thanks,I have already done that but when i give command to change the password
then it doesnot accept it.even i can not able to open vi editor to change the password
files.Plz tell how to change the password .
0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 250 total points
ID: 18789923
> even i can not able to open vi editor to change the password
files.

# mount -t ext2 /dev/hda5 /tmp/root  <=== assume /dev/hda5 is your "/")

After done this, do run "chroot /tmp/root", just edit the /tmp/root/etc/shadow file and delete the second column entry for root account, such as
root::XXX:XXX:XXX:::
      ^
       Delete this entry, which is the encrypted password.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

No security measures warrant 100% as a "silver bullet". The truth is we also cannot assume anything but a defensive and vigilance posture. Adopt no trust by default and reveal in assumption. Only assume anonymity or invisibility in the reverse. Safe…
Recently, I read that Microsoft has analysed statistics for their security intelligence report. It revealed: still, the clear majority of windows users do their daily work as administrator. An administrative account is a burden, security-wise. My ar…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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