Lesson 5 Part I
Creating an NFS Share
This lesson engages the student in some basic system
adminstration. The student is required to complete a
realistic project. This project requires each student to setup an
NFS file share for a neighbor through a guest account. This guest
account will be a normal account possessing a normal home directory and
will have read, write and execute priveleges in the NFS share
filesystem.
Let me outline the major tasks in this project.
Host System Tasks
- Create a guest account using the GUI based utility.
- Verify that the guest account works with a successful login.
- Create the NFS file share directory using the 'mkdir' command or
the Nautilus file manager.
- Setup the correct permissions and ownerships for the NFS file
share directory
- New account should be the owner
- Group should be that of the new account
- Permissions shall be read, write and execute for the owner,
read and execute for all others.
- Install the NFS server configuration tool from your CDROM.
This utility is entitled, 'redhat-config-nfs'.
- Once it is installed it can be activated using the path Main Menu
--> System Settings --> Server Settings --> NFS Server.
Refer to your textbook pages 665 - 675 for additional details.
This utility configures a file called /etc/exports file.
- Now that the NFS configuration file, '/etc/exports' has been
edited, the NFS server (daemon) must be started or restarted. Most
of the service programs are located in a standard directory having a
path of '/etc/rc.d/init.d'. The NFS server is quite simple to
remember, it's 'nfs'. The NFS server is started by executing
'/etc/rc.d/init.d/nfs start' from anywhere or ./nfs start in the
/etc/rc.d/init.d directory. To restart the NFS server, replace the
word 'start' with 'restart' in either of the methods in the previous
sentence.
- The NFS server can be started with a GUI too. This is
accomplished by following the path Main Menu --> System Settings
--> Server Settings --> Services. The service you'll need to
select is 'nfs' in runlevel 3 and runlevel 5. Make certain the
'nfs' server is started if not already running.
Guest System Tasks
- Once you've identified some to use your NFS share, have them
create an identical user account to your new account being used for the
NFS share.
- Verify the NFS share is mountable by trying to mount it in the
root account on the guest system.
- After successfully mounting the NFS share as root, the NFS mount
must be added to the /etc/fstab file in order to enable normal users to
mount the NFS share. Refer to pages 676 - 679 or your instructor
for details on the format to use when modifying this very important file.
- Set permissions and priveleges for the NFS share to permit users
to mount by using the 'user' options. Refer to the man pages for
mount, 'man mount'.
- Mount the NFS share while in the new guest account from the
desktop. I'd suggest, right clicking on the Desktop --> Disks
--> NFS share.
Some Useful Commands and Utilities
- useradd & userdel
- groupadd & groupdel
- passwd
- chmod & chown
- mkdir & rmdir
- mount & umount
- ls, ls -l, & ls -la
- whoami
- pwd