One of the fundamental questions in tackling any Mac problem is where the issue originates: does it come from something in your Home folder, or in one of the macOS system folders, such as /Library or /System/Library?
This is an important distinction. If – as is most common – the cause of the problem is something in your Home folder, then it greatly narrows the scope of your search for its cause. Sometimes you can work this out by starting up in Safe mode (Shift key held), but these days that also prevents a lot of third-party software from running normally, which defeats the purpose.
In ordinary circumstances, the best way to create another user is in the Users & Groups pane. Authenticate, then click on the + tool just above the padlock icon to add the user. If possible, make them an admin user so that you can use that account to address more problems than you can in a regular account. Give the account a strong password, and make sure that you record it safely, as you shouldn’t be using it too often.
Once you’ve made the new user, log off, then log back in using that account. Don’t use fast account switching if you want to do any testing.
An additional user account is both very useful, and quite a pain. You’ll need to associate it with your own Apple ID, with all the verification that will cause. You’ll also need to enable any apps for that account, which is great fun (when even possible) for some licensed outside the App Store system.
Once you have logged in as the new user and made authorised iCloud, the app(s) required, and so on, try to reproduce the problem which you experienced. If you can’t, then it is extremely likely that it resulted from something installed for, or configured in, your normal account – basically, something in that user’s Home folder.
The great benefit of this trick is that, if you have been struggling for an hour or so to do something essential, you may now find that it works fine. The additional user account can thus work around the bug, or whatever issue caused it.
Occasionally, a user’s Home folder gets so badly fraggled that you can’t add a new account in the normal way. In those circumstances, you should be able to do this from Terminal’s command line.
Since OS X 10.10, you have been able to do most of the work of creating a new user account using a single command, sysadminctl
. However, Apple hasn’t seen its way to documenting it in a man
page, so the only way of reading its usage is to type the command into Terminal, which should return:
Usage: sysadminctl
-deleteUser <user name> [-secure || -keepHome]
-newPassword <new password> -oldPassword <old password> [-passwordHint <password hint>]
-resetPasswordFor <local user name> -newPassword <new password> [-passwordHint <password hint>]
-addUser <user name> [-fullName <full name>] [-UID <user ID>] [-shell <path to shell>] [-password <user password>] [-hint <user hint>] [-home <full path to home>] [-admin] [-picture <full path to user image>]
-guestAccount <on || off || status>
-afpGuestAccess <on || off || status>
-smbGuestAccess <on || off || status>
Pass '-' instead of password in commands above to request prompt.
So a command like
sudo sysadminctl -addUser username -fullName "Long Username" -password "password" -admin
should do the job nicely.
You’ll then need to create a Home folder using a command of the form
sudo createhomedir -c -u username
and you’ll find that this time createhomedir
does have a man
page.
The final steps, for an admin user, are to add the account to the key groups, using something like
sudo dseditgroup -o edit -a usernametoadd -t user admin
sudo dseditgroup -o edit -a usernametoadd -t user wheel
which is again documented in a proper man
page.
To make all this take properly, you’ll then need to restart your Mac, perhaps using the reboot
command in Terminal.