Trick to fix if you can not login to MacOS Mojave after installation

In the case that you face a trouble that you can not login to the OS after installing the new macOS 10.14 Mojave. The others may can enter, but then be sent to the login screen again. The below trick will be so helpful on this particular circumstance.

  • Just Restart the Mac at normal and keep holding down the Command + S keys as it boots up.

  • You then are sent into a command prompt on the screen. Now, you are able to enter the following command line:

/sbin/mount -uw /
  • Make sure you Press Enter on your keyboard, and then enter in the following:
rm /var/db/.applesetupdone
  • No worries since nothing important has just been deleted. Now, restart your Mac and then you will be asked to create new administrator account with new password.