How to gain access after you lost your password
It is possible that you have lost your password or changed your keyboard language input and cannot access your Mac anymore. In this case there are several options. First of all, check if your keyboard is still working properly by connecting an external keyboard to your Mac. If your external keyboard is working, chance are that you Macs keyboard is defect. If you still encounter problems with your external keyboard, we can continue to reset your Macs password.
Do one of the following:
If things just got a bit too geeky for you, don’t be alarmed. If you follow the next few steps, you’ll recover your lost admin password in no time.
A welcoming graphical window will appear, allowing you to reset your admin password in a familiar way.
If this doesn't work try the next thing:
mount -uw
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
passwd username
If this doesn't work you could try one last thing:
If you use FileVault encryption with your Mac, the password reset utility will not show your boot drive until you first unlock it with Disk Utility. To do this, open Disk Utility where you will see your drive grayed out in the list of devices. Select it and click the Unlock toolbar button and then, after supplying your password to unlock the drive, you can select your disk in the password reset utility.
Enjoy,
Your ArtIT Team