Big Sur: Deleting users after they have logged out

kpeng09
New Contributor

My team and I are trying to move away from DeepFreeze going forward with Big Sur but is kind of stumped on how to do it.

We work in a student lab with 200 macs so ultimately, we want to delete the users profile after the student have logged out. We used DeepFreeze because we granted all student admin privileges (required by the lab policy) and so with DeepFreeze, all user changes was reverted including the creation of the user profile. However, we found the slow updates with DeepFreeze as a company for each Mac OS release annoying so we want to move away from it if possible.

A lot of old threads point to logout hooks, but that has been deprecated. Some have pointed in using Offset, but it doesn't seem to be updated with Big Sur nor do we want to be dependent on a community script that is not properly maintained.

Has anyone successfully created a workflow to delete user profiles after user logs out in Big Sur? Our last resort would be running a script when the lab closes to remove all user profiles, but that would only be a workaround for us.

Any tips/suggestions would be appreciated.

2 REPLIES 2

grecopj
Contributor

Hello, Have you found a solution to this? I use a script that worked in Mojave. Our students log in with their AD credentials. When they logout, it deletes the home folder. Found that it would delete the contents first then on next logout from a user, it would delete the whole folder. Would specify which admin home directories to keep along with the root. That all being said, it does not work with BigSur. Would be interested if you were able to find a solution.

dross
New Contributor II

I moved my script to the start up trigger. Deletes all users except my local admin accounts  on restart.