Post-Enrollment Autologin w/ PYCREATEUSERPKG

Cranappras
New Contributor III

I’ve started working on a depNotify workflow for our computer labs, and decided to use the pycreateuserpkg ( https://github.com/gregneagle/pycreateuserpkg ) tool for creating a temp user account w/ autologin enabled. I’m installing the package with an Enrollment Complete trigger, which works, but the system won’t autologin to that account upon exiting the Setup Assistant. However, if I click the restart button from the login screen, the computer will autologin with the account when it comes back up, so the account package / settings seem fine.

Any ideas on how I can get the autologin to work without having to restart after the Setup Assistant completes? I’ve been testing on a 10.14 MBP system.

7 REPLIES 7

tjhall
Contributor III

Hello and good afternoon.

I'm trying use this as well as a first run on Mojave 10.14.1. so it get's the secure token. I can't get the account to auto login after it's run. Did you find a solution to this?

Nix4Life
Valued Contributor

@jsmith-ppu

that sounds like expected behavior since you are running setup assistant. Have tried including a reboot in your script?

@tjhall

not sure if that is possible.

rquigley
Contributor

I'm in the same boat.

I currently have it setup that after the installation of the user, that the machine completes a reboot which then logs in as the user and starts the DEP process.

If there is a way to prevent this reboot and jump straight into this user, I'd be happy to see it.

tjhall
Contributor III

Got it working by using this: https://github.com/MagerValp/SkipAppleSetupAssistant
I tried a couple of different variations but it seems that adding it last to our re-install process (adding a product ID to it first) works.
So it now re-installs and 'flips' into the login screen after finishing the install.
It doesn't auto-login but it's close enough...

steveadams
New Contributor III

@tjhall Thanks this worked for me

Cranappras
New Contributor III

@rquigley How are you forcing the reboot immediately after the Setup Assistant? I tried doing that as well, but couldn't get it to do so automatically.

trevnottrevor
New Contributor

We use a slightly modified version of the workflow listed here. It works in both 10.12 and 10.14:

[https://github.com/jmahlman/DEPNotify-automated](link URL)

If you have questions, I would be happy to assist you offline. The workflow does include a reboot however.