Posted on 10-03-2016 04:46 AM
Can anybody point me to a simple logout hook that will delete all AD mobile users when they logoff? I would like to keep an admin user, Shared folder, and a local user to run Unreal Engine and Unity. I need to keep the three folders named "tsc", "Shared", and "epic", while deleting the AD mobile users. The Macs are in a small lab environment running in an ADS environment.
Posted on 10-03-2016 07:21 AM
We delete a particular category of non-user accounts on logout, so that machines don't clog up with accounts that users won't really understand. We scope a logout policy that runs this script:
if [[ $3 == admin-* ]]
then
jamf deleteAccount -username $3
echo "Deleted $3's mobile account."
else
echo "$3 was not deleted."
fi