Date: Sun, 29 Dec 2002 13:19:03 -0800 From: richard childers / kg6hac <fscked@pacbell.net> To: lewiz <purple@lewiz.info> Cc: freebsd-mobile@freebsd.org, FreeBSD-questions <freebsd-questions@freebsd.org> Subject: Re: Working remotely. Message-ID: <3E0F66C7.CF4626F6@pacbell.net> References: <20021229200153.GA61755@lewiz.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Lewiz, Reading your questions, I am left unclear as to whether the NFS, NIS/YP, and server are at home, or at work. However, I'll try to answer your questions, based on about 15 years of administering these sorts of setups. "I have considered writing a script that uses rsync to synchronize the laptop with the server, in so much as maintaining a local copy of the homedirectory ..." This is the crux of the matter; you need a local copy. The question then becomes, which is the master and which is the slave, or copy? I recommend thinking of your laptop's current contents as the master, it makes things easier but if your server is providing megastorage for your MP3 collection, you're going to have to evolve your own, more complex algorithm for synchronizing specific elements of your home directories on each system with one another. Perhaps this is a better approach, anyway; what needs to be synchronized? If you're using it as a backup mechanism, maybe tar(1)'ing up your home directory into a timestamped tar(5) file and copying that to the server mkes more sense, along with a complementing script that deletes all tar(5) files over N days old, to keep disk usage to a minimum. The other problem is the relationship between NIS/YP login information and your local login information. It sort of sounds like this laptop was built with a built-in NFS/NIS/YP dependency that assumed that you'd be using it on campus only. Not very well thought out, or tested, IMHO. I would recommend creating a login which we will call your 'off-campus', 'roving', or 'disconnected' login. This login has a UID and GID of N, and a home directory of, say, /local/home/roving. Create a corresponding login which in every way matches the data found by using the ypcat(1) command (they still have ypcat(1), don't they? It was so damned useful, except for IT-embarrassing moments like when one's corporate passwd file ended up on the Internet ... of course, this was before shadow passwords. But I digress). Make sure you reference the NFS home directory. Now, either sync your laptop home directory to a subdirectory of your server home directory, or vice versa (rsync(1) is fine, tar(1) is good too), according to disk space and whimsy, and you're done. If you ever have problems logging in (and YP was notorious for problems, you need a working ypslave or three on every subnet, and a lot of people balk at that sort of resource allocation), just use your 'roving' login to access your local resources while, perhaps, running some sort of script to diagnose the problem so that you can help your IT department fix it faster. For instance, ypcat(1) might deliver a truncated map, or no map at all, or maybe the ypserver's not responding to pings, or ... Hope this helps !! -- richard lewiz wrote: > Hi, > > This may have come up before but I've not found anything after > searching Google that quite satisfies the question. > > I run my laptop on my network during evenings but during the daytime I > attend college, where I really need to access my documents, mail, etc. > Is there any method of synchronizing the laptop with the server (I have > an NFS exported homedirectory and use NIS/YP for authentication). > > I have considered writing a script that uses rsync to synchronize the > laptop with the server, in so much as maintaining a local copy of the > homedirectory -- I can do this quite effectively using > /etc/start_if.{if}. However, I have various problems with my Maildir > mailbox (files have letters appended to the filename depending on their > status) that could cause data loss or duplication. > The second problem is with authentication -- is there any way to cache > usernames/passwords so that I can still log on without an NIS/YP server > being available? If not, would the best method be to set up a local > server mirroring the NIS/YP database and authenticate against this? > > Basically, I want to be as productive away from my network as I am at > it but there seem to be various things that don't allow this to happen. > Has anybody found good solutions to them? > > I would be eager to hear what anybody has to say on this matter. > Many thanks, > > -lewiz. > > -- > You may have heard that a dean is to faculty as a hydrant is to a dog. > -- Alfred Kahn > ------------------------------------------------------------------------ > --|| url: http://lewiz.info/ | http://www.westwood.karoo.net/pgpkey ||-- > > ----------------------------------------------------------------- > Part 1.2Type: application/pgp-signature To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E0F66C7.CF4626F6>