You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

unknown user on log in

When I log into my Mackbook air ( M1 2020) ( Monterey operating system 12.2.1) there is an unknown user. This user does not show up on my users and groups in system preferences. Where did it come from and how do I delete it?


MacBook Air 13″, macOS 12.2

Posted on Apr 2, 2022 3:30 AM

Reply
15 replies

Apr 2, 2022 1:29 PM in response to sfteacher

A macOS user account can be hidden from view. Sometimes a school or business will do this with managed systems. You can confirm the user is set to be hidden by using this command in the Terminal app:

dscl  .  read  /Users/<user-name>   IsHidden


Replace "<user-name>" with the actual user name of the unknown user account. For example checking the status of the "hwtech" user account I would use this command:

dscl  .  read  /Users/hwtech   IsHidden


If the result is "No such key: IsHidden", then the user account is not hidden by normal means. If you get a result showing something like "IsHidden 1", then the user account was made hidden by the employer.


You can unhide the user account by using the following command (again replacing the "<user-name>" part with the actual user account name you want revealed to macOS):

sudo  dscl  .  /Users/<user-name>  IsHidden  1  0


This command will ask for your admin password. Nothing will appear on screen as you type the password, so after typing the password press the "Return" key to submit the password. I don't believe this command will work unless the "IsHidden" key already exists. If successful and the "IsHidden" key was set to "1" (aka "true"), then the macOS user account should appear in the Users & Groups System Preferences list of users.


For reference here is an Apple article which mentions how to hide a macOS user account, but unfortunately does not provide instructions to unhide it (or reverse the change -- there are two ways to reverse the change and I've provided the least invasive option):

Hide a user account in macOS - Apple Support


Apr 2, 2022 1:49 PM in response to sfteacher

Open the Terminal app. It is in your Mac's Utilities folder and looks like this



You can find Terminal by using the Finder's Go menu and choosing Utilities, then double-click the Terminal icon.


Copy the following line (you can triple-click to select the entire line) then Paste it into the Terminal window.


sudo dscl . create /Users/6K112018 IsHidden 0


A prompt for your usual Admin password will appear. Type the password. It will not be echoed, not even with •••• characters. Just type the password and press Return. If everything worked as expected the Terminal prompt will reappear as though nothing had happened.


Restart your Mac.


Log in to your usual account, and determine if that user's Account (6K112018) appears in System Preferences > Users & Groups. If so, you can remove it with the [—] (minus) button.


Before removing it, you might want to confirm you really don't need any information in that Account.

Apr 2, 2022 6:55 AM in response to John Galt

Hi John: Thank you for your response. I logged into the unknown user using my password and when it opened the background was from my previous employer which is odd. I bought the computer after I retired and never used it for work. But I did attempt to transfer my data from my work computer to my new one.

I assume that somehow that created a new user. But I would like to get rid of it. It does not show up on my users and groups when I am logged in, but when I log into that user my profile shows up on that user and group. They are both administrative accounts.

Apr 2, 2022 9:56 AM in response to sfteacher

I assume that somehow that created a new user.


That's probably the case. It's somewhat reassuring since the Mac appears to have been consistently under your control, but I am still curious how you are encountering that "unknown user". For example, if you see "Other..." in the login screen and you provide your usual login name and password, it's no different than logging in the usual way.

Apr 2, 2022 2:17 PM in response to sfteacher

Ok. So I did all that and now the account is in my users and groups! But when I click the - button to delete it it says” enter Apple ID password to turn off Find My Mac. Is that what that is? I entered the password, it wants to know what to do with the home folder. Do I delete it?

I deleted it. Everything is perfect , thank you! And I learned the triple click command. You’re a star.

Apr 2, 2022 5:55 PM in response to HWTech

HWTech wrote:

You can unhide the user account by using the following command (again replacing the "<user-name>" part with the actual user account name you want revealed to macOS):
sudo dscl . /Users/<user-name> IsHidden 1 0

Oops, made a slight mistake, as I left out the actual command option so the line should be (forgot the "change" part):

sudo  dscl  .  change  /Users/<user-name>  IsHidden  1  0


unknown user on log in

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.