Posted on 08-28-2018 05:54 AM
So, part of our imaging solution (using PreStage Imaging and Casper Imaging) is to create a local account via a package (which I believe is a package created in Recon). However lately it appears to be semi failing.
The account IS created and can be logged into (i.e. it exists in /var/db/dslocal/Default/users).
But no home folder is created and on first login it wants to do the iCloud login thing which, when it is all running properly, it doesn’t do.
It is all very annoyingly intermittent too. So far only affecting 5 computers. I’m very certain nothing has changed and if it has, I can’t spot what it is.
Thoughts?
Posted on 08-28-2018 06:29 AM
You can throw this in the policy that installs the package or in the image to create the home folder for you to see if that helps (after creating the account of course):
#!/bin/bash
userName=""
/usr/sbin/createhomedir -c -u "$userName"
if [[ -d "/Users/$userName" ]]; then
echo "Successfully created home folder for $userName"
exit 0
else
echo "Failed to create home folder for $userName"
exit 1
fi
Posted on 08-29-2018 08:50 AM
Thank you for that, a useful trick.
I'm just conscious that this has been working for about a year and a half and only now is having problems. I was wondering if anyone might have come across it before or could offer up any edge-case reason as to why it might be happening.