Quickly Setting Up PLIP and NFS
If you have two different UIDs on hermes and zeus, you can still read files on zeus from hermes in directory /nfs/hermes/hermname provided the files are world readable. Thus, you can list and copy files, but you won't be able to modify them, even if the directory was exported with read and write access. This is true because zeusname and hermname are considered to be two distinct users. Linux identifies users by using their UID, not their account names.
If all you want is to copy files from hermes to zeus and it does not bother you that files are world (or group) readable on hermes, you can leave things the way they are. More likely you will wish to write files on hermes' disk as well as read them. You must choose the same UID for zeusname on zeus and hermname on hermes, and it must be distinct from any other UID that might already exist on both systems. It is also better to have the same identification number for the group, GID, but this is probably the case already; using Slackware, the default group for users is just “users” with GID equal to 100.
The UID is stored in the /etc/passwd file. On each line of this file is the information for a particular user beginning with the user name. The UID is the third field from the beginning of the line, fields being separated by colons (:). Once you have determined a UID that suits you, edit the /etc/passwd file and insert the proper UID. Assuming the UID 410 on zeus can be used on hermes as well and the GID is 100, there is nothing to change on zeus. Then change ownership of the files in your home directory on hermes by giving the command:
hermes# chown -R 410.100 hermname .
Make sure you issue the command from your home directory or else expect to face some problems. Have a look at the man page of chown to make sure you understand how it works. In the case where you have to change the UIDs on both zeus and hermes, issue the same command from your home directory on zeus.
Note: Make sure that changing ownership won't affect file access for other users. This could cause trouble if you had files or directories that you own but which you share with other users in the same group.
I now have two computers, connected using a local network with PLIP, file sharing with NFS. Sounds pretty good, doesn't it? Yes, but we want more.
If we have Internet access from zeus via a PPP connection (or an Ethernet card), we can use zeus as a gateway for hermes to have Internet access. In other words, we can use the PPP connection on zeus from hermes through the parallel cable. We will do this using IP masquerading. This is the subject of a stand-alone article (see “IP Masquerading with Linux” by Chris Kostick Linux Journal July 1996), so I am just going to give pointers to some relevant documentation. See Resources for the web address of the IP Masquerade HOWTO and the Firewall-HOWTO. You will have to recompile the kernel to activate masquerading. Create a /usr/sbin/ipmasq-on.sh script on zeus containing the lines:
#!/bin/sh ipfwadm -F -p deny ipfwadm -F -a m -S 192.168.93.0/24 -D 0.0.0.0/0
Invoke the script as root on zeus when the PLIP connection is active. I know this is not enough information, but masquerading is not the subject of this article and the HOWTO contains all the details.
I said in the beginning of the article that I just wanted a temporary connection between zeus and hermes; it looks like I got a little carried away and am close to making it permanent. By the way, I wrote most of this article on hermes, with the file residing on a zeus file system mounted via NFS. Yes, I think it is truly becoming permanent.
Webinar: 8 Signs You’re Beyond Cron
On Demand NOW
Join Linux Journal and Pat Cameron, Director of Automation Technology at HelpSystems, as they discuss the eight primary advantages of moving beyond cron job scheduling. In this webinar, you’ll learn about integrating cron with an enterprise scheduler.View Now!
|Dr Hjkl on the Command Line||May 21, 2015|
|Initializing and Managing Services in Linux: Past, Present and Future||May 20, 2015|
|Goodbye, Pi. Hello, C.H.I.P.||May 18, 2015|
|Enter to Win Archive DVD + Free Backup Solution||May 18, 2015|
|Using Hiera with Puppet||May 14, 2015|
|Urgent Kernel Patch for Ubuntu||May 12, 2015|
- Initializing and Managing Services in Linux: Past, Present and Future
- Dr Hjkl on the Command Line
- Goodbye, Pi. Hello, C.H.I.P.
- Using Hiera with Puppet
- Gartner Dubs DivvyCloud Cool Cloud Management Vendor
- Enter to Win Archive DVD + Free Backup Solution
- Mumblehard--Let's End Its Five-Year Reign
- Infinite BusyBox with systemd
- It's Easier to Ask Forgiveness...
- Urgent Kernel Patch for Ubuntu