System Administration Guide: Basic Administration

ProcedureHow to Share a User's Home Directory

Use the following procedure to share a user's home directory.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Verify that the mountd daemon is running.

    In this release, mountd is now started as part of the NFS server service. To see if the mountd daemon is running, type the following command:

    # svcs network/nfs/server
    STATE          STIME    FMRI
    online         Aug_26   svc:/network/nfs/server:default
  3. If the mountd daemon is not running, start it.

    # svcadm network/nfs/server
  4. List the file systems that are shared on the system.

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

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

    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 that contains 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 that you do not have to wait to reboot the system.

  8. Verify that a user's home directory is shared.

    # share

Example 5–2 Sharing a User's Home Directory

The following example shows how to share the /export/home directory.

# svcs network/nfs/server
# svcadm network/nfs/server
# 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   ""  

See Also

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.