I have a series of local accounts on a El Capitan (Need to stay on 10.11.6 due to app compatability). I want these accounts to get the "default profile" every time they log in. I mean * absolutely clean* - new desktop, downloads, settings and preferences.. I want it all gone.
I go about this by having a logout script that simply deletes the home folder, such as:
sudo rm -R /Users/myusername
This way the user and password is retained, but all rubbish that was left on the account is gone, and clean for the next login.
This works absolutely fine, except... the dock has three question marks on it when the user logs back in until the machine is rebooted. The question marks relate to three applications that are not installed on the Mac (Keynote, Pages, and Numbers). This problem happens from a clean download and install of OS X using the recovery utility.
Does anyone have any ideas why this might be happening? Or does anyone have another method of destroying the home folder that I can try?