Pardon a dumb question, but what's wrong with creating a mail file at
account creation time? On one syste, I use the following script to
create accounts:
!/bin/sh
#
# Script to add a new user
#
home=3D/home
mail=3D/usr/spool/mail
defshell=3D/bin/tcsh
echo -n 'User ID: '
read uid
echo -n 'Username: '
read uname
echo -n 'Full name: '
read fname
echo -n 'Main group: '
read group
echo -n 'Supplementary groups: '
read supgrp
if [ "x$supgrp" !=3D "x" ]; then
supgrp=3D"-G $supgrp"
fi
echo -n "Shell: [$defshell] "
read shell
if [ "x$shell" =3D "x" ]; then
shell=3D$defshell
fi
echo "Creating user $uname ($uid) with home directory $home/$uname"
echo "mail file $mail/$uname and shell $shell"
/etc/useradd -u $uid -g $group $supgrp -d $home/$uname -s $shell $uname
mkdir $home/$uname
chown $uname.$group $home/$uname
if [ $group =3D "nueml" ]; then
mode=3D751
else
mode=3D711
fi
chmod $mode $home/$uname
touch $mail/$uname
chown $uname.mail $mail/$uname
chmod 660 $mail/$uname
chfn -f "$fname" $uname
passwd $uname
--=20
PGP public key available - finger hpa@terminus.storm.net
"The earth is but one country, and mankind its citizens." -- Bah=E1'u'l=
l=E1h
I don't work for Yggdrasil, but they sponsor the linux.* hierarchy.