Posted on 05-18-2018 12:33 PM
Steps to reproduce: Create an imaging workflow using macOS Sierra (AutoDMG). Ensure you do not have any shell script in the workflow. Result? The admin account doesn't get created. The second I put in a script even if all it does is "exit 0", the admin account comes back again. I am using 10.4.1 on Linux (CentOS, originally 6.5 put fully updated via yum update.)
We've recently received a lab full of new 5K iMac units that, predictably, have macOS High Sierra on them. Naturally my first task is to remove APFS and put them back to Sierra, so that's what I'm doing with this workflow. I haven't figured out a way to call a shell script to erase the APFS volume before launching JAMF so I'm just calling it from Terminal manually. Someone kindly posted a script which I modified slightly to name the primary SSD "iMac" instead of the more traditional "Macintosh HD".
#!/bin/bash
convertDisk=$(diskutil list internal | grep -B 2 "APFS Container Scheme" | grep /dev | awk '{print $1}')
diskutil apfs deleteContainer "$convertDisk"
diskutil eraseDisk JHFS+ "iMac" /dev/disk0
exit 0
Posted on 05-18-2018 01:43 PM
You may not be able to accomplish this task. If the iMac's shipped with High Sierra installed they may not be able to be "downgraded" to Sierra.
https://apple.stackexchange.com/questions/307824/new-macbook-pro-remove-high-sierra-install-sierra/307828