-#if ! test -r "$PWFILE"; then
-# echo "Skipping password set from $PWFILE (doesn't exist or permission denied)"
-# #exit 4
-#else
-# echo Setting password from $PWFILE
-# sudo sh -c "cat $PWFILE | tee -| /afs/hcoop.net/common/etc/scripts/change-user-password $USERNM" || \
-# ( echo "cat $PWFILE | tee - | change-user-password $USERNM failed" && exit 5 )
-
- # Delete password file
- #sudo rm -- "$PWFILE"
-# echo "Not deleting $PWFILE. Enable it in the script when you want"
-#fi
+if test -z "$INITPW"; then
+ echo "Skipping password set from $PWFILE (doesn't exist or permission denied)"
+ #exit 4
+else
+ echo Setting password from database
+ actual_user=`whoami`
+ sudo sh -c "echo $INITPW | tee -| /afs/hcoop.net/common/etc/scripts/change-user-password $USERNM" || \
+ ( echo "echo XXX | tee - | change-user-password $USERNM failed" && exit 5 )
+fi