If you have another administrative username (such as the Open Directory (OD) Administrator (diradmin) username, then you can use that to reset the password.
If you don't have another administrative password including a local administrator and if it's your Open Directory Administrator password that you've forgotten, then you'll want to follow HT1194 Mac OS X Server: How to reset the Open Directory administrator password for the sequence used to reset the OD access. (The header of that article lists up through 10.5, but the text also lists 10.6.)
Once you're back in, you'll probably want to consider adding a back-up directory administrator account with an obscure password, and write down that password and stick it in a fireproof safe somewhere, or maybe in a note in your Keychain of your own OS X client system, or some other secure location. I do that with a few servers, storing that data with full-disk copies of the server backups, etc.