The following script, although it is interactive, (instead of reading
a file) served me well, when I had to add lots of users to our POP
It was written by Monica Corigliano.
/userid must be initialized once, by hand, with the first UID to be
used for the new users.
/benv contained a wellcome message for the new E-Mail users.
/w3.aliases is a copy of the aliases file in the Sendmail Server,
grepped to look for possible sinonyms.
mkuser id=$id pgrp='pop' su='false' shell='/bin/false' $1
echo Changing passwd for this new user
echo Sending welcome message
mail -s "Welcome !" $1 < benv
echo "--->>> Remember to update the aliases file! <<<---"
grep $1 w3.aliases
# Update next userid to be used
((newid = $id + 1))
echo $newid > /userid