I'm helping to teach two Unix courses next week. Users will be granted an account on a RHEL 5 machine, during which time they'll add files to their
/home folder, update their
.bashrc and other dotfiles, and perform other general messiness that needs to be cleaned up.
Students in the second session will be reusing the user accounts of the folks in the first session. I'd like to automate the cleanup of their accounts, so new users can start fresh.
I'm sure I could write a shell script that runs a
su -u $USER_ID and lays down an "original" set of good files in their homedir, and removes anything else it finds. Are there other tools that will help me with this clean/reset operation? I don't have any experience with Puppet, Chef, or other tools. Would they be helpful to do something like this?
To provide a scope of the problem, there's about 30 user accounts, I know all the userid/passwords, and they're all created on the same RHEL box.