Views
NfsNisSetup
Current NIS and NFS setup for teaching lab.
Abstract --------
I describe the design and implemetation of the NIS and NFS network setup for allowing the SGI O2 and linux machines in the teaching lab to be used transparently by any authorized user.
Introduction ------------
We wanted to design the teaching lab so that any authorized user could sit down at any of the teaching lab's machines and work, as if the user were at his very own personal machine. This is accomplished using two UNIX standard networking protocols, NIS (the Network Information Service) and NFS (the Network File System).
NIS is used to share databases among several machines. In particular, UNIX machines have special provisions to allow password files to be shared in this way, which is the principal use of NIS in the teaching lab. A common password, updated centrally, provides access to any of the machines
NFS allows multiple computers to share disk resources, read only or read-write, with certain caveats. In the teaching lab, /usr/people, the directory where home directories are stored for the O2's and its equivalent in Linux, /home, are shared among all the machines. In addition, /usr/local, a software repository, is shared read only to the O2 machines. (The Linux boxes are too heterogenenous to let us share /usr/local)
Implementation --------------
__O2's__
Configuring the server
dartagnan.hpcf.upr.edu, a dual processor MIPS R12000 sgi octane with 1GB RAM running IRIX, was selected as NIS master server and NFS server for the O2 machines in the teaching lab.
Configuring the clients
__Linux__
Configuring the server
pijuyo.hpcf.upr.edu, a Pentium III 733Mhz with 256MB RAM running Debian Potato (2.2r2), was selected as NIS master and NFS server for the Linux boxes in the teaching lab.
Configuring the Clients
Any linux box in the teaching lab can be set up as a NIS/NFS client. Just follow these simple steps:
- Make sure you have portmap and ypbind installed. In an rpm based distribution (like RedHat?), you could type:
$ rpm -qa | grep ypbind ypbind-3.3-24 $ rpm -qa | grep portmap portmap-4.0-17If nothing comes up, then you should get the packages (they're normally in the distribution cd or in any Linux mirror) and install them (look at man rpm for help). If you're in a deb based distribution (like Debian), you could type:$ dpkg -S portmap netbase: /sbin/portmap $ dpkg -S ypbind nis: /usr/sbin/ypbindDon't worry if your output looks slightly different, unless you get something likedpkg: blah not found.
you should be okay. If the package is not installed, then you can use the magic of apt-get and do (as root):# apt-get install netbase ... "lots of output and some questions" ... # apt-get install ypbind ... "lots of output and some questions" ...For more info, do man apt-get and man dpkg. - Set up the nis client. This differs greatly between distributions, so I'll only explain the RedHat? and Debian approach.
RedHat?'s approach consists in using the "setup" program. As root do
# setup
A menu will come up. The first option says: "Authentication configuration" Go in there. Look where it says "Enable NIS" and check it. Then where it says "NIS Domain" put: =linux-hpcf= And where it says "NIS Server" put: =pijuyo.hpcf.upr.edu= Leave the rest untouched and do "OK". Some output should come up on the lower part of you screen saying:Shutting down NIS services: [ OK ] Binding to the NIS domain... [ OK ] Listening for an NIS domain server: pijuyo.hpcf.upr.edu
If you get [FAILED]? or the NIS server name doesn't come up, there's something wrong. Recheck everything, make sure the portmap is running, you have network connection, the DNS is working.. if still it doesn't work, scream. For Debian, you need to edit a couple of text files (always as root). First, edit /etc/yp.conf and add a line with:ypserver pijuyo.hpcf.upr.edu
Then, edit /etc/defaultdomain and put in there:linux-hpcf
Now, go to /etc/init.d, and do:
# ./ypbind start
... "success output" ...
If you don't get the "success output" (it's easy to tell), then recheck everything, make sure networking is up, the portmap is running, dns is properly configured. And if it still doesn't work, scream.
A final note on nis: make sure that group 20 doesn't exist in the local machine. If it does (e.g in redhat, games is gid 20) erase it or change it to something else. Everybody in pijuyo is under that group and weird things happen when you belong to group "games".
Finally, to set up NFS, edit /etc/fstab and put:
pijuyo:/home /home nfs rsize=8192,wsize=8192,timeo=14,intr 1 2
The values for rsize and wsize are the same as those in the man pages, but we should play a little more with those to find optimals.
Now reboot, or mount the nfs filesystem with
# mount -t nfs -a
Administration --------------
Adding or removing users see VizLabAccounts
...to be completed...
Note on adding users to the linux nis server: Everybody is under group 20 (user). This was done to follow dartagnan's behavior. The problem is that when adding users in pijuyo, it'll create a group for each user thus breaking the whole system. People say it's a good idea to have a group for every user, so maybe we could someday do that. But for now, make sure that every new user is assigned group 20.
Changing passwords and passwd fields
...to be completed...
- -- Main.HumbertoOrtiz - 27 Nov 2000
- Main.RicardoBaratto? - 5 Feb 2001