First, don't panic! This is usually a simple matter so long as you have physical access to the console. Simply follow the steps below to boot the system bypassing login, and then set a new password:
The system will boot up into single-user mode with the root file system mounted read-only. To set a new password you will first need to re-mount it read/write:
mount -o remount,rw /
Now you can proceed to set a new root password:
passwd
Reboot and relax.
Subscribe to the RSS feed for Andy's Debian HOWTOs
Article from Andy's Debian HOWTOs (http://www.besy.co.uk/debian/debian)
Discussion