Post-Enrollment Autologin w/ PYCREATEUSERPKG

Release Candidate Programs Tester

I’ve started working on a depNotify workflow for our computer labs, and decided to use the 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.


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?

Valued Contributor


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


not sure if that is possible.


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.

Contributor III

Got it working by using this:
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...

New Contributor III

@tjhall Thanks this worked for me

Release Candidate Programs Tester

@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.

New Contributor

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

[](link URL)

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