On Mac OS X, we don't know any trick to recover a lost password. However, there is at least two tricks to force Mac OS X to change your password.
Change Mac OS X password with the installation disk
Change Mac OS X password with single user mode
This trick is more complicate but it works without your installation disk.