|
The checking for user bit is as per below:
SCRIPT_USER=wcs1234
WHOAMI=$(/usr/ucb/whoami)
if [ "$WHOAMI" != "$SCRIPT_USER" ];then
echo "$CallName: script must be run by $SCRIPT_USER"
exit 1
else
echo "You are $WHOAMI - OK to continue..."
fi
Not sure how to make this execute with another user though....but here's half to check the user.
__________________
Pete
|