Setting up (PC)NFS user entries

Procedure for setting up user entries

Use the steps in the following table to set up user entries for (PC)NFS users.

Step Action
1 Verify that each user of (PC)NFS has an entry in your UNIX /etc/passwd file and /etc/shadow file, if applicable.
2 If... Then...
The filer has not been configured to use NIS for the password database Copy /etc/passwd and /etc/shadow, if applicable, to the filer.
Results

The filer is now ready to serve files to NFS clients using (PC)NFS. Each user on the client system can mount the file system from the filer after entering a correct user name and password.

The filer has been configured to use NIS for the password database No action is necessary.

Example of how to copy files manually

This example shows how to copy the /etc/passwd and /etc/shadow files from a UNIX host to the filer. In this example, the filer root volume is mounted to the UNIX host at the following mount point:

/nfs/toaster

The following commands copy the /etc/passwd and /etc/shadow files from the UNIX host to the filer:

cp /etc/passwd /nfs/toaster/etc/passwd
cp /etc/shadow /nfs/toaster/etc/shadow

Copying files to the filer automatically

You can set up a UNIX host to copy the /etc/passwd and /etc/shadow files automatically. The following table shows you which information to read to learn about automatic copying.

If the filer... Then read...
Uses NIS to authenticate users "Copying files to the filer automatically from NIS Makefile"
Uses /etc/passwd and /etc/shadow files to authenticate users "Copying files to the filer automatically with a cron job"

Copying files to the filer automatically from NIS Makefile

If you use NIS, you can modify the Makefile for the NIS master to copy the /etc/passwd and /etc/shadow files to the filer automatically.

Example

Put the following code at the end of the NIS Makefile section for passwd.time, substituting the name of each filer in the "for" list in place of toaster1, toaster2, and so on. Add the line copying the /etc/shadow file only if you are using a shadow password file.

@mntdir=/tmp/nac_etc_mnt_$$$$;\
if [ ! -d $$mntdir ]; then rm -f $$mntdir; mkdir $$mntdir; fi;\
for filer in toaster1 toaster2 toaster3 ; do \
mount $$filer:/vol/vol0/etc $$mntdir;\
mv $$mntdir/hosts $$mntdir/hosts.bak;\
cp /etc/passwd $$mntdir/passwd;\
cp /etc/shadow $$mntdir/shadow;\
umount $$mntdir;\
done;\
rmdir $$mntdir

Copying files to the filer automatically with a cron job

If you do not use NIS, you can establish a cron job to update the filer.


Copyright © 1999, Network Appliance, Inc. All rights reserved.

Part No. 210-02334
File: nfs12.htm
Last updated: 02/24/99 12:16:26