xen reset guest root password

Discussion in 'Server Operation' started by unclecameron, Nov 18, 2008.

  1. unclecameron

    unclecameron New Member

    I need to reset a root password on a Debian xen guest domain. Is there a way to do this without remounting the domain and chrooting into it? If not, is there someone who can give an example of how to do that?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    I don't think so.

    Like this:

    Code:
    mount -o loop /vserver/images/vm01.img /vserver/vm_base
    chroot /vserver/vm_base
    
    passwd root
    
    exit
    umount /vserver/vm_base
     
  3. unclecameron

    unclecameron New Member

    thanks a lot falko, this saved a lot of time and allowed far fewer angry e-mail users on domU :)
     
  4. rhill

    rhill New Member

    I tried to boot like this but got error message:
    mount: wrong fs type, bad option, bad superblock on /dev/loop0,

    am i doing anything wrong?

    thanks for any help

     
  5. falko

    falko Super Moderator Howtoforge Staff

    Run
    Code:
    modprobe loop
    and try again.
     
  6. erenay

    erenay New Member

    This gives an error: "you must specify the filesystem type". My file system is Linux LVM.
     
    Last edited: Jan 3, 2013
  7. falko

    falko Super Moderator Howtoforge Staff

  8. eloopz

    eloopz New Member

    Hi falko and cameron, I found the following on Skipfast blogspot which worked for me (Debian & LVM)

    Recover XEN Guest Root Password

    Have you come across a situation when you need to reset the root password of a XEN virtual box.

    Logon Host machine run following command to boot guest OS in single usermode and simply recover root user password as normally we do.

    #xm create -c /etc/xen/guest_vm_name extra=1

    Cheers!

    ori on:
    http://skipfast.blogspot.nl/2010/05/recover-xen-guest-root-password.html
     

Share This Page