how to reinstall mac os x

Try bootingh off of the Install CDs and select to reset the password. Once you have reset it, reboot and start from the hard drive again. HOpefully this should do it for you.
Put the OS disc in and restart holding the C key down. After the Installer window appears, go up to the Installer or Utility Menu, depending on which system you have, to Reset Password. Booting from a Tiger (10.4) disc, you'll have to choose the Language before getting the Menus.