Safe way to rsync a homedir on login?

ruscook ruscook_oz at yahoo.com.au
Fri Nov 10 20:18:45 UTC 2006


Not if you run chown afterwards to make sure all the ownerships are
restored.

I do this in resyncing my family members documents directories from
windows machines to our couple of linux machines (rather than mount
directories across the network). The because it's a CIFS/SAMBA
connection ownership seems to follow root becuase it is roots cronjob
and root is the only one other than each individual than has full access
to their home dirs. So running rsync and then a recursive chown makes
sure the ownership is right. You may not need this when doing rsync from
a local directory, however you may if you want to keep your templates
owned by root, so they can't search them out and screw them up on you.
Obviously, the biggest issue is the time taken to login if all these
commands need to be run.

Isn't there other profile and use skeleton files that can do this for
you? (Beyond my experience but someone here may know).

On Fri, 2006-11-10 at 10:43 +0000, Sean Hammond 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?
> 

Kind Regards Russell
==================
www.windsorcycles.com.au
sales at windsorcycles.com.au
ph. 02 4577 3209
bikes.no-ip.info
Linux user #369094
================== 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061111/942999a7/attachment.html>


More information about the ubuntu-users mailing list