Use the steps in the following table to set up user entries for (PC)NFS users.
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
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" |
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.
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
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