|
File Sharing for a Laboratory Network |
The Design and Implementation of File Sharing for a Laboratory Network, including the propagation of password filesBy James P. Schwar File sharing is a convenient method for centralizing the administration and storage of commonly used information on a computer network. Sun Microsystems' Solaris operating system implements file sharing through their Network File System or NFS. This technique allows the user's directories and associated files to reside on a central workstation or server. The server, through NFS, shares these files and makes them available for mounting on remote (client) workstations. This paper discusses Sun/Solaris NFS as it is used in a teaching/laboratory environment. In addition, the detailed implementation of a method for propagating the server password files to each of the client machines is presented. With NFS and password file sharing, a user can log on to any workstation and access his or her home directory as if it part of the local file system even though this directory is physically located on the server. IntroductionThe Solaris 2.x operating system is based on UNIX System V Release 4. As this article is written, the latest version of Solaris is SunOS 5.4. It is a multitasking operating system where multiple users can work on the same system, each user taking advantage of the processing power of the machine or workstation. The networking environment of Solaris includes NFS, whic
h
allows users to share files and directories among computers on a
network. NFS requires one or more servers that provide as their
service shared file systems and several clients that mount these
shared file systems as if they were local to the clients.
Machines that function as servers are the producers of shared
file systems while machines that function as clients are the
consumers. A Sun workstation, running Solaris 2.x, can act as a
server, a client, or both. Each server must be running two
programs:
Commands for File Sharing and MoreThe
/usr/lib/nfs/nfsd -a 20 starts the daemon over all available connectionless transports for up to a maximum of 20 concurrent requests on the server machine. The
The
share -F nfs -o rw /usr2 makes the
The
unshare /usr2 removes the
The
mount -F nfs -o rw,hard server :/usr2 /usr2 will mount the shared
This example specifies a ``hard mount,'' which is the default.
If one attempts a hard mount, the client continues to retry the
mount operation until the server responds, whereas a soft mount
would return an error if the server does not respond within the
time-out period. When it is essential that the shared file
system is mounted before continuing with the execution of
commands, use a hard mount. A successful mount makes an entry in
The
The
Some files related to NFS include:
To initiate file sharing under NFS, the
server must launch the
#server script for NFS startup # /usr/lib/nfs/nfsd -a 20 /usr/lib/nfs/mountd # share -F nfs -o rw /usr2 share -F nfs -o ro /usr/local #end of script #client script for NFS startup # mount -F nfs -o rw,hard server:/usr2 /usr2 mount -F nfs -o ro,hard server:/usr/local /usr/local #end of script File Sharing at LafayetteThe Computer Science laboratory at Lafayette College consists
of seventeen Sun workstations interconnected using a 10-megabit
Eth
ernet. Sixteen of these workstations act as clients and one
workstation is the server. The workstations are currently
running Solaris 2.4. The principal shared file systems are: (1)
share -F nfs -o rw /usr2 share -F nfs -o ro /usr/local share -F nfs -o ro /usr/openwin share -F nfs -o ro /usr/share/man Each client machine must mount at least the following: mount -F nfs -o rw,hard server:/usr2 /usr2 mount -F nfs -o ro,hard server:/usr/local /usr/local Some of the application software that resides in
gcc GNU C compiler g++ GNU C++ compiler gdb GNU symbolic debugger libg++ GNU C++ class libraries basic BASIC interpreter make GNU make perl Practical Extraction and Report Language smalltalk GNU implementation of this Object Oriented Language emacs GNU implementation of this text editor TeX document preparation system LaTeX package of TeX scripts bash GNU Bourne Again SHell gnuplot GNU interactive plotting program pico simple text editor fileutils GNU file utilities shellutils GNU shell utilities textutils GNU test utilities The Password FilesThe
useradd -d /usr2/student -m -g 60001 -u 6001 student creates the new user account named ``student'' whose home
directory is
In order for the user to log on to a client machine and have
access to the home directory in
Several C programs and shell scripts were developed that
extract the
user portion of
When a new user is added to the server, a program is run that
creates the ``.net'' files. These changes are propagated to each
client by copying the ``.org'' files to
The account named ``sysop'' is special. This account is added
to all machines and becomes part of the original password file.
With a user-ID of 6000, user ``sysop'' can access the ``control
software'' found in
The subdirectory
The script that updates the client password files must be run on each client machine and be exe cuted if and only if the network password files exist. The script that purges the network password files must be run on the server. The compiled C program that creates the network password files should be run on the server every time the server password files are changed. The server password files are the ``global'' password files
propagated to all client machines on the network. Only changes
to the server password files will find their way to each of the
clients. The net result is that a user must log on to the server
and execute the
Certain commands should be executed immediately after loading the operating system on a client machine. This need be done but once. Namely:
Certain commands should be executed immediately after loading the operating system on the server. This need be done but once. Namely:
The startup or initialization scripts stored in
System administrators who want a general-purpose interface to add and delete users without the need to modify the sample scripts should invoke admintool which offers a graphical user interface to the useradd and userdel commands. The program
The appropriate commands that invoke
crontab server-cron-table-file and: crontab client-cron-table-file SecurityIn general, a superuser on a client machine is not allowed access to file systems shared across a network. Unless the server specifically grants superuser privileges, a user who is logged on as root on a client cannot gain root access to the files on the server. NFS implements this security feature by changing the user-ID of the requester to that used for the ``nobody'' account, generally 60001, whose access rights are the same as those given to the public--or ``other'' user category-- for a particular file. Earlier versions of Solaris and standard BSD assign 65534 to the ``nobody'' account. However, an NFS server can grant superuser privileges on a
shared file system on a per-host basis, using the
share -F nfs -o rw,root= hostname /usr2 allows the superuser of client
If a user exists on the client machine and has the same user-ID as a user on the server then the root account on the client can gain access to the NFS-shared files for that user on the client machine, as shown: su [ enter the client root password ] useradd -g 60001 -u uid anyname su anyname This technique works with any name on the client machine because only the user-ID must match the value found in the server password file. Access to the user's shared directory is then granted. This works with or without automounting. Access to shared files can be restricted to a selected number
of clients by using the
The user portion of the password file and shadow file are
present on the shared directory
In general, this method for propagating password files is best suited to standalone networks and small subnetworks where the system administrator can restrict access to ``root'' and ``sysop.'' Those individuals who have root access to a client should be ``trusted users.'' SummaryFile sharing under Solaris NFS consists of invoking the
appropriate programs (system commands) and populating certain
system tables.
The important commands are
The
The propagation of the password files requires a
dditional
software and user-generated files. The key commands are
An alternative for propagating the network password files
would be to use the remote shell (
ConclusionsThis simple, yet relatively effective method of sharing file
systems and password files is easy to maintain and implement.
Once the appropriate support files are installed on the
clients
and servers, little or no additional maintenance is required.
The
The commands needed to propagate the password and shadow files
can be run by
The purpose of this technique is to minimize system load and to simplify administrative tasks. It should be particularly effective in a teaching/laboratory environment where a professional network administrator is not available. After over a year of operation at Lafayette College in the Computer Science laboratory, no down time has been experienced as a result of this technique. It should be noted that there are mo re sophisticated and vastly more complicated methods for sharing files, such as NIS+. It must be emphasized that this method for propagating password files stresses simplicity at the expense of security. There is a small window in time during which the password files exist in a shared directory. This technique is best suited to standalone networks and small subnetworks where user access to the root and sysop accounts are controlled. References
|
Print This Page Send as e-mail |
Best of the Web
Data deduplication: Declawing the clones
Data deduplication is emerging as a critically important new arrow in the storage administrator's quiver to answer hard questions about the increasing problem in storage growth costs.
Compression, Encryption, Deduplication, and Replication: Strange Bedfellows
One of the great ironies of storage technology is the inverse relationship between efficiency and security: Adding performance or reducing storage requirements almost always results in reducing the confidentiality, integrity, or availability of a system.
WAN Optimization Whitelists and Blacklists
Optimization is a fantastic way of saving money and creating really happy customers at the same time, but it doesn't work flawlessly for all applications.
WAN Optimization as a Managed Service: It's Not About the Cost
This insight examines how organizations outsourcing their WAN optimization initiatives to a third-party go about achieving their goals for application performance, reducing operational costs, and streamlining enterprise infrastructure.






