Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Need help on resetting root password of a CentOS which is a guess OS (domU) in XEN. I already tried to get to grub but it doesn't display or maybe using a different grub (pygrub). Thanks in advance.

share|improve this question
    
Do you have control of the Dom0? – fukawi2 Apr 15 '13 at 4:21
    
Please post the DomU-configuration. What XEN-Server ist this, which CentOS-major version, how is the DomU disk configured? – Nils Apr 17 '13 at 10:42
up vote 2 down vote accepted

Shut down the guest VM, mount its disk on another VM that you have access to, then manually change the guest's /etc/shadow, or do a chroot to the mounted disk followed by "passwd".

share|improve this answer

If you have access to the parent:

xm console $vm

Will drop you into the console (can be escaped out of like telnet).

share|improve this answer

1- Shut down your server using the Xencenter controls

2- Right click on machine and select Properties 3- Go under Boot options Change the OS Boot Parameters to rw init=/bin/bash

Some times for some OS especial CentOS you will need to write in the field the word single instead of rw init=/bin/bash so try both if first trick didn’t work. 4- Save and Start your virtual machine

Your system will boot up in single user mode. So to change your password, you need to type this command:

bash# passwd root

5- Type in your new password you will then be asked to confirm it

Your password has now been reset.

6- Shutdown your virtual machine. Now go back to the xencenter and startup options and remove rw init=/bin/bash and change it back to whatever was there before. Start up your server and you should be able to logon with your new root password.

Source : http://www.unixmen.com/reset-root-password-linux-vm-hosted-xenserver/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.