How I Made My Home Directory Syncronize Accross A Network, Is there A Better Way?
Hello, after hours of tinkering I finnaly made GDM rsync my home directory to a server on logout, and then rsync it back on login. This way my Home Directory is the same on every machine in the network. Does anyone have any improvements on my below method.
1. I first created a script called sync_home_down.sh in /etc/gdm/PreSession with the bellow contents:
RCOMMAND="rsync -avrzogtp -e ssh --safe-links p43200ht.rjmcomputer.com:/media/storage1/homes/$USER/ /home/$USER"
then I added a line to the top of the Default script in the same directory:
2. Next I created a script called sync_home_up.sh in /etc/gdm/PostSession with the bellow contents:
RCOMMAND="rsync -e ssh -avrzogtp --delete --safe-links --exclude=.Xauthority /home/$USER/ p43200ht.rjmcomputer.com:/media/storage1/homes/$USER"
then I added a line to the bottom of the Default file in that directory
I set it all up to use passwordless ssh under the root account, since gdm seems to like running these scripts as root.
Does anyone see a problem with this method, or know a better way?
There's usually many ways to do anything on a nix system. I say the one that works is the right way. If your way works then that's the way. Having it run as root is probably the only red flag in your procedure but eh, it works.
|All times are GMT -5. The time now is 03:46 AM.|