Please back up all data before proceeding.
1. If you enabled root logins, follow the instructions in this support article under the heading "Disable the root user." You must authenticate in Directory Utility as "root" with the root password. Authenticating as another administrator won't work. If you've forgotten the password, ask for instructions to reset it.
Log out and test. If there's no change, continue.
2. These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
Triple-click anywhere in the line below on this page to select it:
sudo defaults delete /L*/P*/com.apple.loginwindow.* SHOWOTHERUSERS_MANAGED
Copy the selected text to the Clipboard by pressing the key combination command-C.
Launch the built-in Terminal application in any one of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad and start typing the name.
Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting. You'll be prompted for your login password. Nothing will be displayed when you type it. Type carefully and then press return. If you don’t have a login password, you’ll need to set one before you can run the command. You may get a one-time warning to be careful. Confirm. You don't need to post the warning.
If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. Log in as one and start over.
Wait for a new line ending in a dollar sign ($) to appear below what you entered. You can then quit Terminal.