Removing User Accounts/Home drive at logout

esmirb
New Contributor

We are using Yosemite 10.10.2 with Server App 4 with Profile Manager, we bind our computers only to AD.
Does anyone know of a way, perhaps a script, to remove all user profiles or all user home drives at the logout?
In the Profile Manager there is a section called "Login Window" and a tab labeled "Scripts".
There is a section to upload a login or logout script.
This is where I was hoping to control that.

I would appreciate any input you can provide.

Thanks

4 REPLIES 4

MSaraiva
New Contributor

Hello,

If you go into Directory Utility, where you set-up the AD binding , there is an option there: "Create mobile account at login".
If you uncheck this all accounts with their home folders will be deleted at logout.

I think this should solve the problem without any script...

hodgesji
Contributor

You can also do this from a Configuration Profile, setting the time after that mobile account logs out that it will delete the home folder. We use Casper for our profiles, but I'm assuming there is an equivalent using Profile Manager:

7214128dc0cc4b868a4e75ae26179946

yadin
Contributor

This functionality appears to not be working, at least setting it to 0 which is supposed to delete the account at logout. Neither the mobile account nor home folder are deleted as they should be. In the old days of the OS, say 10.6 with WGM/MCX, this worked properly, but so far it seems to be broken in 10.10.4 using a profile. I have not tried to lengthen the expiration time yet to see if it's only 0 value that is bugged.

I have done this with scripts and logout hooks for 10.8 and 10.9, but it's not a very elegant solution. If Apple's own stuff is broken though, I won't have much choice. I was hoping this profile stuff had matured. And yes hodgesji, all those options in Casper are just pulled right from Profile Manager, it's identical.

Has anyone managed to make this work?

Aziz
Valued Contributor

@ebonweaver

Take a look at this discussion.

https://jamfnation.jamfsoftware.com/discussion.html?id=15210