#!/bin/sh
#
# Created for the MIT Libraries by Eric Celeste, 1997 (?)
#
# 980803 (efc) fixes for new verion of athena & hostname changes
# 000512 (orbitee) fix for "libraries" hostname change

cmdir=/afs/athena.mit.edu/project/mitlibs/mailstuff

case "$HOST" in

lauren*)
echo You appear to be on Lauren, updating /etc/passwd...
su root -c "cd /etc;$cmdir/mkpasswd -i -v -s"
;;

macfadden*)
echo You appear to be on Macfadden, updating /etc/passwd...
su root -c "cd /etc;$cmdir/mkpasswd -i -v -s"
;;

malgosia*)
echo You appear to be on Libraries, updating /var/www/database/access/libstaff.txt...
su root -c "cd /var/www/database/access;$cmdir/mkpasswd -v;mv passwd.names libstaff.txt;chmod a+r libstaff.txt"
;;

*)
echo "upasswd does not work from the machine you are using"
echo "try it from lauren, macfadden, or malgosia"
;;

esac
