Reset Forgotten Admin Password on macOS Mojave and macOS Sierra

Boot into Recovery Partition

Reboot into the Recovery Drive by choosing the ‘Apple‘ menu > Restart, hold down the ‘command’ + ‘r’ keys on the keyboard during the start up process, when you see the start up screen you can let go. When the machine boots eventually you will see the macOS or OS X Utilities screen.

Go to the Utilites menu and select Terminal

At the prompt type ‘resetpassword’ (hit enter)

Enter new Password for admin user

Finish

How to show hidden files in Finder OS X 10.9?

sho-hidden files
Open your termnial then type  to show hidden files:

defaults write com.apple.finder AppleShowAllFiles TRUE

Open your termnial then type  to hidden files:

defaults write com.apple.finder AppleShowAllFiles FALSE

I am not using any Apps,  I am using 10.9.2 and it is working flawlessly without the need to reboot.