If you have a bootable CD or floppy that lets you get in as superuser (shell prompt "#" instead of $ or %), or if you can remove your drive and hook it into another mac, then the rest is straightforward. Mount the drive, edit its /etc/passwd file to set the root password there to an empty string, unmount it. Boot from it and set a new password.