Solved

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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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