Create logout hook script to delete numerical user accounts only

DeployAdam
New Contributor III

Hi everyone, we used to create a logout *.sh script to execute at user logout. This script deletes all user accounts with a number in their profile since our students all have that.

Now I'd like to implement the same in Casper and already enabled login/logout hooks. Also I created the script but I can not find where/how to attach the script to execute on a machine.

*Deleted unnecessary info*

1 ACCEPTED SOLUTION

JPDyson
Valued Contributor

If you've already added your script to your JSS (via Casper Admin, or creating it through the Scripts view), all that remains is creating a Policy triggered by Logout that runs this script. It's "Casper 101" type stuff, but everybody starts somewhere. Have you read the section of the admin guide on policy creation?

View solution in original post

2 REPLIES 2

JPDyson
Valued Contributor

If you've already added your script to your JSS (via Casper Admin, or creating it through the Scripts view), all that remains is creating a Policy triggered by Logout that runs this script. It's "Casper 101" type stuff, but everybody starts somewhere. Have you read the section of the admin guide on policy creation?

DeployAdam
New Contributor III

Thank you for answering this fast, we just did a jumpstart and have so many options to figure out. I looked over the trigger logout hook in policy settings. This should do the trick.