System Administration Guide: Basic Administration

How to Share a User's Home Directory

  1. Become superuser or assume an equivalent role on the system that contains the home directory.

  2. Verify that the mountd daemon is running.


    # ps -ef | grep mountd
    root   176     1  0   May 02 ?        0:19 /usr/lib/nfs/mountd

    The /usr/lib/nfs/mountd line shows whether the mountd daemon is running.

  3. If the mountd daemon is not running, start it.


    # /etc/init.d/nfs.server start
    
  4. List the file systems that are shared on the system.


    # share
    
  5. Select one of the following based on whether the file system containing the user's home directory is already shared.

    1. If the user's home directory is already shared, go to the verification step below.

    2. If the user's home directory is not shared, go to Step 6.

  6. Edit the /etc/dfs/dfstab file and add the following line.


    share -F nfs /file-system
    

    file-system is the file system containing the user's home directory that you need to share. By convention, the file system is /export/home.

  7. Share the file systems listed in the /etc/dfs/dfstab file.


    # shareall -F nfs
    

    This command executes all the share commands in the /etc/dfs/dfstab file, so you do not have to wait to reboot the system.

  8. Verify that a user's home directory is shared, as follows:


    # share
    

Where to Go From Here

If the user's home directory is not located on the user's system, you have to mount the user's home directory from the system where it is located. For detailed instructions, see How to Mount a User's Home Directory.

Example—Sharing a User's Home Directory


# ps -ef | grep mountd
# /etc/init.d/nfs.server start
# share
# vi /etc/dfs/dfstab
 
(The line share -F nfs /export/home is added.)
# shareall -F nfs
# share
-               /usr/dist                ro   "" 
-               /export/home/user-name     rw   ""