Friday, August 17, 2012

Upgrade weirdness

I've recently been upgrading my Macs to Mountain Lion, and I hit one particular problem that may be relevant to someone else.  When I upgraded my Mac Book Pro, everything appeared to be fine - and then I noticed that when the screen saver cut in, the password lock was not activating.

Inspecting the System Preferences - > Security & Privacy dialogue revealed that the check box of "Require password after sleep or screen saver begins" was greyed out.  Everything else in the dialogue worked as expected, but not that.  I tried the usual things - log off and on, reboot, etc. - to no effect.  One thing that I did notice was that if I tried to set account password to blank from this dialogue, I got a message that said "Your password did not meet the requirements specified by your server administrator..".  This struck me as odd, and pwpolicy revealed no specific policy settings.

Eventually I called Apple support, and spent about 90 minutes with them, with much deleting of preference files, resetting of ACLs and many reboots.   The check box remained stubbornly greyed out.  Apple support stated that the problem was likely to be a third party application, and delicately suggested a reinstall.

I thought about this, and decided that it made little sense.  I run essentially the same applications on all my machines, and only the Mac Book was experiencing a problem.  The password requirements error message struck me as significant, and it occurred to me that, in the past, the laptop had been joined to an AD domain.  I believe I have stated before that, every time I am compelled to interact with Microsoft products, I have bad experiences;  how one company can have unleashed so much truly nasty software on the world and still made a profit defies understanding.

Other accounts did not present the same problem, so, working on the theory that AD had in some way corrupted the user account, I decided to try something.


Login as root, and start Terminal.

mv /Users/myaccount /Users/myaccount.backup

Go into System Preferences and delete the affected user account.

Recreate the user account.

Go back to Terminal.

mv /Users/myaccount.backup /Users/myaccount

chown -R myaccount /Users/myaccount

Log out as root.

Login as myaccount

Problem solved.  If you are going to do this, be VERY CERTAIN that you have a good backup before you start.

Addthis

Bookmark and Share