_mbsetupuser remaining on systems


It's my understanding that _mbsetupuser is the user related to Setup Assistant. However, I've found numerous systems in our environment that still show that user as being in place after the systems have been provisioned. Considering that it's on a small subset, I'm thinking the account didn't get properly removed. 

Anyone else seeing this and what would be the correct approach to remove that account?


Contributor III

I'm not aware of any provision in macOS for it getting removed. I would expect it to persist indefinitely, albeit as an invisible account. 

Esteemed Contributor

@stephanpeterson Any chance those Macs haven't been restarted since Setup Assistant completed? I believe there's some cleanup that occurs on restart that may not have happened yet on those Macs if so.

Yeah, I would have thought the same. However, these are Macs that are in service and have been restarted numerous times.

Honored Contributor

So this user is the built in user account that is present during initial setup, like already mentioned in this thread.  The user seems to stay on disk after setup.  During setup though if you provision anything as that user is active, and the first user from initial setup has not taken over the user context yet.  I have buffer in my code to account for this.  

The account might be used for other things like Recovery Mode or something that I am not aware of, but you can view the record in directory services with this `dscl . read /Users/_mbsetupuser`

Is your issue that this is the MDM enabled user or is there a bug, or are you just concerned it is there and causing problems?