The following use to work - I think it's no longer a feature as of 10.13 (or 10.13.3 or 10.13.4 NOT POSITIVE) You must manually login to Root. If I am wrong, please correct me and let us know how you did it!
after enabling root with directory utility and then running these commands from root terminal... use to work..
sudo defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser root
sudo defaults write /Library/Preferences/com.apple.loginwindow autoLoginUserUID 0
sudo shutdown -r now
@Hugonaut Thank you Hugo - it works! Appreciate your help!
Great to hear, glad to help. I guess with integrity off it allows it, didnt work with integrity on (on mojave) for me!
@Hugonaut @mhasman Did you get that to work with Mojave? I was able to get it to work back with 10.13.3 but I havent been able to get it to work since. Tried SIP disabled, with or without a password for root. Doesnt auto login.
I did not try it with Mojave yet. Maybe will try in 2-3 weeks
@chrisdaggett I have a workflow for AutoLogin not sure if it will work for root though.
Here are the steps I took:
(Works with 10.14.6)
- I used this tool to create a py script. MacUserGenerator
- Add the py script into a custom PKG with composer
- Create a kcpassword for this account https://github.com/xfreebird/kcpassword and add it to you custom PKG
- Add a post install script & kcpassword into the PKG.
- Done
Post Install Script:
(replace Administrator with your username)
#!/bin/sh
#Account Script
sudo chmod +x /tmp/admin.py
sudo python /tmp/admin.py
#Enable Autologin
sudo defaults write /Library/Preferences/com.apple.loginwindow.plist autoLoginUser -string Administrator
#Reboot Mac
sudo shutdown -r now
exit 0 ## Success
exit 1 ## Failure
@kericson I've used your workflow and autologin still doesn't work for me. Well, it works if i execute the workflow AFTER the user has logged in once. How is your policy triggers - ie is it part of a DEP workflow?
@mhasman @Hugonaut @chrisdaggett @kericson Did you guys get that to work with Catalina?
@arnoldtaw Unfortunately not so far. Catalina is making things difficult on all accounts. (and just sucks in general IMO even administration aside... if I'm blunt).
@arnoldtaw I haven't tried this with Catalina. My results on this became more hit and miss so I moved away from it.
@arnoldtaw No, i did not succeed using root. So, instead of breaking macOS, I had to adopt another solutions