Problems with KACE Online Shell Script (Mac OSX)
I have a bash/zsh shell script I’ve written that works perfectly when I run it manually inside of Terminal (with sudo). My hope is to push it out through KACE to have it run on a schedule on the iMacs we have in a computer lab. All users are required to sign in with their Active Directory credentials, and mobile accounts are created when they sign in, so the accounts need to be periodically flushed. The script is designed to delete user accounts and the home folders for those accounts, other than a select few admin or native accounts and the currently logged on user, with the eventual goal being to use this to replace Deep Freeze. However, when I push the script out with KACE for testing, I am getting “operation not permitted” errors once it begins trying to delete files/folders. Does anyone know why this might be occurring since the KACE agent is supposed to be running as root?