Safe way to rsync a homedir on login?

Florian Diesch diesch at spamfence.net
Sat Nov 11 12:36:26 UTC 2006


"Sean Hammond" <sean.hammond at gmail.com> wrote:

> So I'm managing a couple of Ubuntu machines in a cafe. There is a
> 'public user' account which logs in automatically when the machines
> start up. It has the 'Desktop User' profile.
>
> One problem we have is that users will change all the settings, make
> the address bar disappear in Epiphany, add toolbar bookmarks to their
> personal sites or favourites, and generally mess the whole thing up,
> and then just leave it that way until someone comes along to figure
> out what they did and undo it. This happens all the time.
>
> Using a combination of Sabayon [1] and Pessulus [2] I've managed to
> prevent users from making most changes (unless they know how to Alt-F2
> "pessulus" in which case they can change whatever they please) and yet
> somehow they still manage to find ways of making changes that make the
> computer unusable for the next person that comes along.
>
> To prevent users from downloading hundreds of files and leaving them
> on the desktop, which also happens, I wrote an rsync script that is
> run by GNOME on login, and that syncs from a folder outside of the
> user's home containing the default files I want in the homedir to the
> users home folder, so that on login the Desktop shortcuts etc. are
> replaced and any downloaded files are removed. The script doesn't
> touch the user's hidden files as I didn't want to mess that up.
>
> But now I'm thinking I should just get rid of Sabayon and Pessulus and
> have this rsync script replace the user's hidden files as well,
> syncing the entire homedir on login with an eternal default homedir.
>
> My question is, will running an rsync script like this on login cause
> any problems? I'm particularly thinking of any gnome programs that run
> on login, they might start before the rsync script is run, and so read
> their config files before they get synced. Any advice?

I would remove the whole $HOME at logout and restore it with a fresh
copy using gdm's PostSession script.


   Florian
-- 
<http://www.florian-diesch.de/>




More information about the ubuntu-users mailing list