Cover V02, I03
Article
Figure 1
Figure 2
Figure 3
Figure 4
Listing 1
Sidebar 1
Table 1

may93.tar


Listing 1: Creating a USERFILE from /etc/passwd

Listing 1(a) : genUSER program
:
#
# @(#) genUSER - generate a USERFILE from /etc/passwd
# CHris Hare, 1993
#
# This script will process /etc/passwd, and create a default USERFILE for
# use with Version 2 UUCP.
#
PASSWD=/etc/passwd                      # Location of /wtc/passwd
USERFILE=./USERFILE                     # Location of
USERFILE
OLD_IFS="$IFS"                          # Save current Field Separators
IFS=":"                                 # Set new field separator
#
# Process the entire passwd file
#
exec < /etc/passwd
#
# Read each entry
#
while read USERNAME PWORD UID GID COMMENT HOME SHELL
do
#
# write each entyry consisting of
#    USERNAME,
#    /usr/spool/uucppublic
#    HOME directory
echo "${USERNAME},\t/usr/spool/uucppublic $HOME" >> $USERFILE
done
#
# exit ... we are finished
#
exit 0

Listing 1(b) Sample Output from genUSER

root,   /usr/spool/uucppublic /
daemon, /usr/spool/uucppublic /
bin,    /usr/spool/uucppublic /bin
sys,    /usr/spool/uucppublic /
adm,    /usr/spool/uucppublic /usr/adm
uucp,   /usr/spool/uucppublic /usr/lib/uucp/uucico
nuucp,  /usr/spool/uucppublic /usr/lib/uucp/uucico
uucpadm,        /usr/spool/uucppublic /usr/lib/uucp
lp,     /usr/spool/uucppublic /bin
tutor,  /usr/spool/uucppublic
install,        /usr/spool/uucppublic
chare,  /usr/spool/uucppublic