[SATLUG] Needing password for Debian login
Daniel J. Givens
daniel at rugmonster.org
Sun Dec 30 20:07:00 CST 2007
Richard Suberg wrote:
> The office bought a custom appliance that comes loaded with Debian.
> Its sole purpose is to synchronize documents between another server
> (located elsewhere, where we bought it from) to several people's
> laptop. We do own this unit. All attempts to get them to give us the
> password results in "we can't give it to you. if you need any maintenance
> on it let us know and we can do it for you." Funny thing is, they are not
> open on the weekends, when we would do any drastic changes since our
> office is closed. Does anyone know how to get in? I do have physical
> access to the machine - was thinking about putting in a bootable CD of
> some distro (Ubuntu most likely) to be able to change the password file.
> Next thing is, would this work? Any other suggestions?
> Richard
>
I'll skip the SLA warning...
If you can reboot it AND modify the boot string, you can get in single
user mode and change the password.
-For GRUB-
Interrupt the boot process at the GRUB screen and on the primary
selection, hit "e" to edit the boot option. Arrow down to the kernel
line and hit "e" again to edit it. At the end of that line, add "1"
(just the number) and press Enter, then "b" to boot the system into
single user mode.
-For LILO-
At the boot: prompt, type "linux single" (minus quotes) and hit enter.
Once booted into single user mode, you will be dumped directly into a
root shell. Use passwd to change the password.
If you can't get the system booted into single user mode, you can boot
from any linux boot disk that has support for the disk controller of the
disk storing the system's root filesystem. Any will do, but if the
system is AMD64, you will need an AMD64 boot environment.
First, boot from your bootable media. Once booted, open a root shell and
mount the local system's root filesystem to some place. For example
sake, I'll say you mount it at /mnt/localroot. Once you have it mounted,
you will need to chroot to the environment:
# chroot /mnt/localroot /bin/bash
Once that is successful, you will be working in the environment of the
local box as root. You can then use passwd to change the password.
Lesson here is that you don't need fancy tools to h at x0r a box if you
have physical access.
Good luck and let us know if you need additional help.
Daniel
More information about the SATLUG
mailing list