LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 12-28-2006, 03:04 PM   #1
rmurdough
LQ Newbie
 
Registered: Dec 2006
Posts: 1

Rep: Reputation: 0
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"
eval $RCOMMAND


then I added a line to the top of the Default script in the same directory:

/etc/gdm/PreSession/sync_home_down.sh


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"
eval $RCOMMAND


then I added a line to the bottom of the Default file in that directory

/etc/gdm/PostSession/sync_home_up.sh


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?

Thanks
 
Old 12-28-2006, 03:26 PM   #2
bitva
Member
 
Registered: Dec 2002
Location: Los Angeles
Distribution: Debian
Posts: 72

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Directory services made easy with Fedora Directory Server LXer Syndicated Linux News 0 12-08-2006 04:54 AM
Is it possible to cache a network home directory for laptops? amagi Linux - Enterprise 2 07-13-2006 02:52 AM
Disk Storage (accross network) podollb Linux - Software 2 01-20-2006 01:31 AM
Perl/Linux: Syncronize tree structure on network kenneho Programming 1 11-04-2005 05:42 AM
How to syncronize/backup my home directory? blixel Linux - General 3 10-20-2003 11:21 PM


All times are GMT -5. The time now is 01:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration