Very strange /Users permissions issue

AVmcclint
Honored Contributor

On very rare occasions I get this very strange problem. I will login to a random Mac as the local admin account and I notice that the login takes a very long time. When I get to the desktop I notice that the wallpaper is back to the default wallpaper for that OS version, the hard drive icon is missing, and the Dock is back to the default layout. When I launch Terminal I get various errors - usually saying that I don't have a home directory. When I try to go to /Users in the Finder, I am denied access. If I try to open my Home Folder (by clicking on the Finder icon) I get an empty window and no path. Upon further inspection I discover that the permissions on /Users has changed from 755 to something like 700. I can't remember the exact permissions, but basically I had no rights even as the admin user. AND I discover that the home folder for the local admin and the Shared Items folder are gone. What I end up doing is to reset the permissions on /Users to 755 and then reboot to login as the Admin user to let it recreate the home folder again. Luckily this hasn't happened on any Macs that are actively being used by users. This has only been on spares that I use for loaners or testing. I've been seeing this happen since probably Yosemite, but definitely El Capitan and Sierra. It is very random and very infrequent, but the fact that it happens at all is a great mystery. I certainly don't have any policies in place that would do anything even remotely destructive like this. And definitely no Composer-built packages set to change permissions on /Users.

I can't seem to find anything in the system logs to indicate what's happening. I certainly can't find anything that jumps out and says "now deleting your home folder and changing permissions on /Users" Has anyone else seen anything like this?

5 REPLIES 5

GabeShack
Valued Contributor III

Sounds slightly similar to an issue I kept seeing on Yosemite and newer systems where the User Template gets screwed up. When I would check the user's library folders, some of the folders came out formatted as files instead. In the user template I created empty Folders named what they should be and it fixed this issue. Not sure if this is the same as what you are describing though.

Gabe Shackney
Princeton Public Schools

Gabe Shackney
Princeton Public Schools

AVmcclint
Honored Contributor

The user template was a thought, but the admin account has been used many times without trouble on each affected Mac before this happens. It has happened on a couple Macs more than once though.

GabeShack
Valued Contributor III

Another thought, Is it possible that someone created an AD account that has the same name as the local admin?

Gabe Shackney
Princeton Public Schools

Gabe Shackney
Princeton Public Schools

AVmcclint
Honored Contributor

Definitely not. If that was the case, then I'd expect it to be way more widespread of a problem. And I checked AD just to make sure. :)

Asnyder
Contributor III

I noticed something similar when I had accidentally used the same uid for two different admin accounts when using createuserpkg. The first one installed as a 498 account and the second one was also a 498 account so it just changed the home directory and everything else.