Sub topic 9
Rule out user-level problems with a test account
This chapter assumes you can open System Settings, use Finder, and run a command in Terminal. You should also have a recent Time Machine backup, as described in the earlier chapter on backing up before you reset anything.
Some problems follow you into every app, and you can't tell whether macOS or your own settings are at fault. A temporary test account answers that question. It's a new user with a clean home folder, so none of your preferences, login items, caches or per-user add-ons come with it.
Why a new user isolates the problem
macOS keeps two layers of state:
- System level: macOS itself, drivers and system extensions, files in
/Library, and the hardware. Every user on the Mac shares this layer. - User level: everything in your home folder, including
~/Library/Preferences,~/Library/Caches,~/Library/Application Support, your login items, and per-user launch agents.
A new account starts with default user-level state and the same system-level state as your account. The result of the test is therefore informative:
| Result in the test account | What it means | Next step |
|---|---|---|
| The problem is gone | Something in your own account causes it | Reset app preferences, review login items, check per-user Library files |
| The problem still happens | It sits in the system layer or the hardware | Safe mode, First Aid, then Recovery (later chapters) |
| The problem is different or partly gone | Mixed causes, or the test was not the same as the original | Repeat the test with exactly the same steps |
Create the test account
Use System Settings. The Terminal method comes later in this chapter.
- Open System Settings and choose Users & Groups.
- Click Add Account (older macOS versions show a plus button). Authenticate with an administrator password.
- Set New Account to Standard or Administrator.
- Enter a full name such as
Test User, an account name such astestuser, and a password you will remember. - Click Create User.
Choose the account type to match your problem. A Standard user is enough for crashes, slow apps and visual glitches. Choose Administrator if the problem involves installing software, changing system settings, or anything that asks for admin rights. A Standard user would fail for the wrong reason.
You may be offered a prompt to sign in with an Apple Account. Skip it. Signing in with the same Apple Account syncs iCloud data, such as Desktop and Documents, settings and keychain items, into the test account. Those synced items can reintroduce the cause you're testing for, and the test would no longer be clean.
Switch to the test account
Log in without logging out of your own account, so your apps stay open and you can return quickly.
- Click the Apple menu and choose Log Out, or use fast user switching from the menu bar or Control Center (Control Center > Fast User Switching, if you enabled it in Control Center settings).
- At the login window, choose Test User and enter the password.
- Click through the Setup Assistant screens. You can skip every optional step.
If you use fast user switching, your own session stays logged in. A heavy process in your session can still consume memory or CPU, so a performance test is more reliable after you log out of your own account completely.
Confirm which account you are in before you test. This Terminal check prints the current user name:
whoamiIt prints testuser in the test account. This matters because it is easy to run a test in the wrong account after switching back and forth.
Run a fair test
A test is only useful if it repeats the original problem as closely as possible.
- Reproduce the same steps with the same app and, if you can, the same file. Keep a copy of the file in a shared location such as
/Users/Shared, because the test user can't read your home folder. - Note anything that differs. If the app needs a license, a plug-in or a login, the test account may fail for a reason that has nothing to do with the original problem.
- Give intermittent problems enough time. If the problem usually appears within an hour, use the test account for at least that long.
- Test one problem at a time. If you change several things, you won't know which one mattered.
Edge cases that change the result
Peripherals and displays. Hardware problems follow you into any account. If a display flickers or a USB device disconnects in both accounts, the cause is not in your user settings.
Login items and background helpers. Many user-level problems come from software that starts at login. In your own account, review System Settings > General > Login Items & Extensions. If the test account is clean and yours is not, disable items one at a time and log out and in between each change.
Shared system files. Something installed for all users (in /Library) is present in the test account too. If a third-party driver or system extension is the cause, the problem will happen in both accounts. This is why a test-account failure points to the system layer.
FileVault. If FileVault is on, a new user cannot unlock the disk at startup unless you enable them. For this test, that does not matter, because you log in with fast user switching or after your own account unlocks the disk. After a restart, log in with your own account first.
Managed Macs. On a work or school Mac, profiles from a device management system apply to every account. Do not remove them. A problem that appears in both accounts on a managed Mac may come from policy, so ask your administrator.
Time and attention. A new account runs first-time tasks, such as indexing and setup, so it can seem slow for a few minutes. Wait for them to settle before you judge performance.
Create and delete the account from Terminal (optional)
The sysadminctl command does the same job as System Settings. It is useful on a Mac where you are working remotely. First, list the existing local users so you know what is on the Mac. The dscl command prints accounts with ID 500 or higher, which are the ordinary human accounts:
dscl . list /Users UniqueID | awk '$2 >= 500'Then create the test user. The final - after -password makes the command prompt for the password, so it does not appear in your shell history:
sudo sysadminctl -addUser testuser -fullName "Test User" -password -Add -admin to the command if you need an Administrator account.
When you finish, log out of the test account and log in to your own account. Remove the test account with this command:
sudo sysadminctl -deleteUser testuserBy default, this command deletes the user's home folder too. Add -keepHome if you want to keep it. In System Settings, you can do the same with Users & Groups: click the info button next to the account, choose Delete User, and select Delete the home folder. The other choices keep the data in a disk image or leave it in place. Because the test account has no data you want, deleting the home folder is the right choice.
What to do with the result
If the problem disappeared in the test account, your home folder is the likely cause, and you can fix it without touching the system:
- Reset the preferences of the affected app, as in the earlier chapter on app preferences. Move only that app's
.plistfile to a backup folder. - Check Login Items & Extensions and disable anything you don't need.
- If a single app is still wrong, quit it and move its folder in
~/Library/Application Supportto your backup folder. The app recreates it at the next launch. - If many apps remain broken and nothing else helps, copy your documents to a backup and consider migrating to a fresh account. This is a larger step, so try the smaller fixes first.
If the problem remained in the test account, stop changing your own settings. Move on to the system-level steps in the following chapters: safe mode, then First Aid. This follows the order set out at the start of this tutorial, from least to most disruptive, and it saves you time. Resetting preferences on a problem that isn't in your preferences has no effect.
Exercise
You create a test user and repeat the steps that make a video editing app crash. The app crashes in the test account in exactly the same way. Does resetting that app's preferences in your own account help, and what should you try next?
Show answer
Probably not. The crash in a clean account means the cause is at the system level (for example, a shared driver, a system extension, or a damaged startup disk), or in the hardware. Your own preferences are not the cause. Next, try safe mode, which loads only the essential system software, and run First Aid in Disk Utility on the startup disk. If the problem continues, move on to macOS Recovery or Apple Support.
Exercise
Why should you avoid signing in with your Apple Account in the test user, and which account type should you choose if the problem involves installing software?
Show answer
Signing in with the same Apple Account syncs iCloud data and settings into the test account, and those synced items could bring back the cause you want to rule out, so the test would no longer be clean. For a problem that involves installing software or changing system settings, create an Administrator account, because a Standard user lacks the rights and would fail for an unrelated reason.