Introduction

Before windows existed, there was the need to share files between computers on a network, and so the specification for a Network File System (NFS) was created. This allows you to remotely mount a directory to a local system and have it behave as if the files were stored locally. The goal of this lab is to provide you with practical experience and instruction on configure a FreeBSD host to share file systems across different networks. We will also cover granting appropriate read and write access, and controlling remote root access over an nfs mounted disk.

Pre Lab Requirements

In order to successfully complete this lab, you are responsible for reading and understanding the NFS section of the BSD Handbook. This is a very definitive resource on the subject, and is not specific to only BSD.

Three File Sharing Scenarios:

  • Unix accessing files on Unix (NFS)
  • Unix accessing files on Windows (SMBFS)
  • Windows accessing files on Unix (SAMBA)

Over the course of the next few labs we will cover each of these scenarios in detail. It is possible to use an NFS client for windows, using the "Microsoft Windows Services for UNIX", however this tends not to work as well as running SAMBA on the Unix machine.

Step 1 – Configuring FreeBSD as an NFS client

Step 2 – Configure FreeBSD as an NFS server


NFS server

Unix to unix file sharing using NFS (Network File System) is the standard way to share files over networked unix machines. Once the NFS server software is enabled through sysinstall (or by making entries directly to the /etc/rc.conf file) there are a number of processes or daemons (services) that are used to provide NFS server functionality. The following are system daemons and files that are used by NFS:

nfsd (the NFS daemon, add: nfs_server_enable="YES" to the rc.conf file)
rpcbind (the Remote Procedure Call daemon, add: rpcbind_enable="YES" to the rc.conf file)
mountd (Controls access to the mount points that are shared. add: mountd_enable="YES" to the rc.conf file)

Step 3 - Expanding The concepts and Tuning NFSd

Last updated: 2010-01-26
Updated by: Cheri Weaver