Debian 5 Install Login Password

debian

I just installed Debian 5 however the install didn't ask me for a root password.

At any rate I can't log in because I don't know the root password.

Is there any way to regain access or do I have to install again?

Best Answer

You don't need a live CD.

  • Reboot, go interactive at the boot prompt (grub).
  • append "init=/bin/sh"

This will replace "init" with a shell, you'll fall straight into a shell, however root will be read-only.

  • mount -o remount,rw / will fix that.

Change your password (mount /usr if you need to), umount everything, reboot.