From: Blaisorblade <bla...@ya...> - 2006-08-12 18:34:56
|
On Wednesday 09 August 2006 15:14, Samuel Korpi wrote: > On 8/9/06, Priya PM <pm...@gm...> wrote: > > I forgot my root password to login. Is there anyway I can login without > > password or is there anyway I can reset the password? > > Provided that your guest (UML) distro uses /etc/passwd to store the > password hashes This works even with /etc/shadow (which is the most common choice) - obviously you'll need to edit /etc/shadow in this case. > , you can reset the root password as follows (note that > you need root access on the host system to do this): > > 1. mount the uml rootfs: > > mount -o loop <path_to_rootfs> <temp_mnt_path> > > 2. from the file <temp_mnt_path>/etc/passwd search for a line like this > > root:XXXXXXX:0:0:root:/root:/bin/bash > > where XXXXXXX represents the password hash > > 3. remove the hash from the file, unmount the rootfs and start uml - > no root password > is required to login -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade http://www.user-mode-linux.org/~blaisorblade Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com |