While booting the machine on hold down the Command (⌘)+ S keys on the keyboard.
You have done this correctly if you start to see the computer boot to a black screen with white text detailing the system boot process.
Once the boot process has finished type the following:
/sbin/mount -uw /
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
Type the new root password twice once prompted. Once finished reboot the computer with:
Once the Mac has restarted you should see the option to select “Other…” as a user sign in option. Enter the username of “root” and password you created earlier