OS X 10.8 Mountain Lion allows for easy password recovery via the Recovery HD partition installed on any 10.8 system. Here is how to reset your password:
1. Boot into the Recovery HD partition by holding Command-R during boot and before the Apple logo appears.
2. After the Recovery boot is complete, Choose Terminal from the Utilities menu.
3. Type “resetpassword” at the Terminal prompt and press return.
4. Choose your system disk (f.e. “Macintosh HD”) and the user account to reset the password for.
5. Enter the new password and hit the Save button.
Historically, the Directory Services were responsible for DNS queries and caching on Mac OS X 10.5 and earlier. Back then, to clear the DNS cache one would issue the “dscacheutil -flushcache” command. With the further development of various services based on the multicast DNS a mDNS service fully took over both unicast and multicast DNS queries and response caching on later OS X versions.
While the “dscacheutil” is still there even on OS X 10.8 Mountain Lion, it won’t reset the caches properly. The correct method to clear DNS cache on 10.7 and 10.8 is to restart the mDNS service, “mDNSResponder”:
sudo killall -HUP mDNSResponder
If this doesn’t seem to help, try reloading the service: