#!/bin/bash
# $Header: /cvs/WebShield/wsrc/files/mgmt/Attic/set_ui_password,v 1.5 2004/02/12 11:59:31 bwhittak Exp $
#
# (C) Copyright Network Associates Inc. 2001
#
# Set the user interface password
#
if [ -f $NETAWSS/.profile.vars ]; then 
 . $NETAWSS/.profile.vars 
else 
 . /var/NAIENV/.profile.vars 
fi 
PATH=$wsPATH:$PATH

# This script assumes SU login to work - may need to be changed
# when Tomcat is not started as root


# set the password for the support user
if [ "" != "${1}" ]
then
    echo "$1" | /usr/bin/passwd --stdin support > /dev/null 2>&1
    echo "!$1" | /usr/bin/passwd --stdin root > /dev/null 2>&1
    echo "$1" |
	/usr/sbin/saslpasswd2 -u webshield -pc webshield > /dev/null 2>&1
    echo "!$1" | /usr/sbin/saslpasswd2 -u webshield -pc root > /dev/null 2>&1
fi

