WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] can the root password be recovered from a DomU

To: Kevin McKeon <kevin.w.mckeon@xxxxxxxxx>
Subject: Re: [Xen-users] can the root password be recovered from a DomU
From: Tim Wickberg <wickbt@xxxxxxx>
Date: Fri, 22 May 2009 16:12:49 -0400
Cc: Xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 26 May 2009 07:19:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <76f329a40905221302o4d7c469ds7f6d9e1119ec2d91@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <76f329a40905221302o4d7c469ds7f6d9e1119ec2d91@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)
Assuming your image file has been partitioned, you'll need to specify the offset to the start of the partition you want to mount. Otherwise you're trying to mount the partition table as a filesystem, which is why you see the "must specify a filesystem type" error.

What you want (assuming you want the first partition, which starts at block 62 * 512 bytes/block) is:

mount -o loop,offset=$((62*512) mydisk.img /mnt

A few quick references:
http://darkdust.net/writings/diskimagesminihowto
http://www.openclose.it/creare_e_usare_un_disco_immagine.do


Kevin McKeon wrote:
Just curious if anyone knows this. If you loose the root password on a Linux box, you can just boot from CDRom, mount the root partition and edit /etc/shadow.
Is it possible to do something similar with a DomU.

I tried:
mount -o loop mydisk.img /mnt
but I got an error saying something like "you must specify a filesystem type" mount -o loop -t ext3 mydisk.img /mnt does NOT work either (I've also tried moving the '-t ext3' part but no go)

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users