Sierra (10.12.4) upgrade without user logged in (or scripting auto-login)

LukeMason
New Contributor III

Hey all,

So I'm trying to build a workflow that we can use to upgrade all of our (compatible) computers to Sierra this summer (while the schools are empty). We have a lot of computers in our district (including bretford carts full of Macbook Airs), spread out across 15 communities (some are very remote).

Previously, we were leveraging the "createOSXinstallPkg" utility, but (according to their page) as of 10.12.4, this is no longer an option.

I've looked into Josh Roskos' method (here & here), as well as some other methods (like this one). I've gotten them working from Self Service without any problems, and I've adapted them so that they run automatically (assuming a user is logged in when the policy triggers).

HOWEVER, if the policy runs while no user is logged in, I get the following error (this is output from Roskos' script):

Script result: Power Check: OK - AC Power Detected
Disk Check: OK - 475GB Free Space Detected
Launching jamfHelper as FullScreen...
Launching startosinstall...
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
2017-04-06 13:39:43.763 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-04-06 13:39:43.764 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-04-06 13:39:43.764 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-04-06 13:39:43.765 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-04-06 13:39:43.766 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-04-06 13:39:43.767 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-04-06 13:39:43.767 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-04-06 13:39:43.767 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-04-06 13:39:43.768 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-04-06 13:39:43.768 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-04-06 13:39:43.768 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-04-06 13:39:43.770 jamfHelper[505:2526] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data

Is there any way around this?

I've also tried scripting an account to auto-login, but it's not going very well. Is it even possible to do this anymore?

I've tried various methods:
- I sometimes use an AppleScript via ARD to log-in to multiple computers (eg. in a computer lab), but it doesn't seem to work if I push it out with the JSS
- I've tried using composer to package up the loginwindow plist & the "/etc/kcpassword" file (after using the GUI to set a local user to auto-login).
- I used the "CreateUserPkg" utility to create a temporary user and set it to auto-login.

So far, none of these methods result in a user actually logging in automatically...

I never thought I'd say this, but I'd even be happy if I could trigger the "adobeinstall" user that Casper Imaging uses.

Please help. At this point, I'm considering going back to using an OS install pkg from 10.12.3 & then pushing out the update to 10.12.4 afterward.

1 ACCEPTED SOLUTION

psliequ
Contributor III

It looks to me like jamfHelper doesn't like being called on a logged out system.
What happens if you comment those parts of the script out?

View solution in original post

2 REPLIES 2

psliequ
Contributor III

It looks to me like jamfHelper doesn't like being called on a logged out system.
What happens if you comment those parts of the script out?

LukeMason
New Contributor III

Well for heaven's sake!

Thank you @psliequ , you have resolved my problem.

I just spent a few hours troubleshooting a problem that doesn't exist...