Autologin and mcx

friedelj
New Contributor III

Has anyone had any luck configuring autologin and getting mcx settings to apply to the user that auto logs in?

We have a local user account that gets configured to autologin for classroom instructor computers during the first run script after imaging. On the restart following completion of the first run script, the computer auto logs in with the appropriate account, but user level mcx settings aren't applied (dock icons is the most prevalent). If you logout, then login with the local user account, it then applies the mcx settings. It also applies mcx settings for any network accounts that login.

I should also note that we are using mcx settings through Open Directory at this time. I have also tried running the mcxrefresh command for that user account and even though it doesn't error, it isn't working. It doesn't even create the folder for the user account under /Library/Managed Preferences and manually creating the folder first didn't help.

2 REPLIES 2

robo
New Contributor III
New Contributor III

I've been seeing the same thing on 10.8.3, using a classroom workflow (that was working fine on 10.6.8) whereby the 'student' account is deleted nightly along with its home directory, recreated, set to autologin, and the machine is rebooted. Upon reboot, the student account is missing many (but not all!) MCX settings. Logging it out and back in again sees all the MCX settings applied. This is with MCX from the JSS, not OD, but the symptoms sound similar.

My initial suspicion is that somehow the autologin is happening too soon after startup for the jamf binary to check, parse, apply, and recomposite the MCX for the user before they're already logged in and its too late. There are often cryptic errors in the jamf.log saying Error: Import of Managed Preference Setting "FooBar" failed, where "FooBar" is a seemingly random MCX preference that should have been applied.

If there was a way to delay autologin, that might work, but I don't know of one. Certainly, I haven't seen this problem with users that log in manually. In my case, I've instead added to the script that deletes/recreates the account so that it does a 'jamf mcx -username user' for the newly created account, just before rebooting, so that the user's MCX settings are already there when the machine starts up and logs the user in.

Not sure if this helps in your situation (and your post is old - you may have resolved it otherwise) but I thought I'd post here since the problem you describe is so similar and I haven't seem much other discussion of this.

nessts
Valued Contributor II

create a launchdaemon script pair, that unloads loginwindow, runs jamf mcx, then loads the loginwindow.

something like this maybe...

#!/bin/bash
launchctl unload /System/Library/LaunchDaemons/com.apple.loginwindow.plist
jamf mcx
sleep 30
launchctl load /System/Library/LaunchDaemons/com.apple.loginwindow.plist