Solved

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

Posted on 2007-03-24
4
3,783 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Users of Windows 10 Professional can disable automatic reboots using the policy editor. This tool is not included in the Windows home edition. But don't worry! Follow the instructions below to install (a Win7) policy editor on your Windows 10 Home e…
Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

630 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