[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [school-discuss] Student desktop machines: cleanup on logout?
On Thu, Nov 10, 2005 at 12:35:59AM +1000, Alan E. Davis wrote:
> I remember seeing a posting (was it on this list?) about how to
> set up a linux box, so that when a student logs out, the home
> directory is returned to a known state.
bash(1):
When a login shell exits, bash reads and executes commands from the
file ~/.bash_logout, if it exists.
Insane.
zsh(1) mentions /etc/zlogout, so seems like the solution could
involve (I'm writing it for e.g. a Linux system, adaptations
for OSX are yours):
- create user
- set up user account (incl. /bin/zsh as a login shell)
- UMASK=077 tar cf /var/lib/home_user.tar /home/user
- add to /etc/zlogout something like this:
nice rm -rf /home/user
nice tar -C / -xpf /var/lib/home_user.tar
--
---- WBR, Michael Shigorin <mike@xxxxxxxxxxx>
------ Linux.Kiev http://www.linux.kiev.ua/