If you forget the password of your Windows NT server or the workstation, repair the machine with the ERD. If you don't have that, go to another machine, change the local Administrator password to the one that you can remember, rdisk and create one.
Now repair the locked machine with this new ERD, only replace the SAM files.
Next time you log on, put in the new password for the Administrator account. While doing this you will loose your old SAM so its always a good idea to have a BDC maintaining accounts.