Solved

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

Posted on 2007-03-24
4
3,520 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

Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

Join & Write a Comment

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
Article by: btan
The intent is not to repeat what many has know about Ransomware but more to join its dots of what is it, who are the victims, why it exists, when and how we respond on infection. Lastly, sum up in a glance to share such information with more to help…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 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

8 Experts available now in Live!

Get 1:1 Help Now