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.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Sony Settles in Linux Battle
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Libarchive Security Flaw Discovered
- Profiles and RC Files
- Maru OS Brings Debian to Your Phone
- Understanding Ceph and Its Place in the Market
- Snappy Moves to New Platforms
- The Giant Zero, Part 0.x
- Git 2.9 Released
- Astronomy for KDE
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide