Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AIX KSH script needs modification 1

Status
Not open for further replies.

sjcrane

MIS
Jan 18, 2006
41
0
0
US
I have a script that authenicates everyone to DB app except for root goes to shell as shown below:

# Added for LikeWise
#######START#######
uid=`id -u`
if [[ $uid != 0 ]];then
> .sh_history
exec csession ENSEMBLE -U HHM "^ZU"
exit
fi
########STOP#######

I need to add more UID's to it now but cannot figure out how to modify.

I need to have 0,210,etc.

Any help would be appreciated...
 
Use the case statement:
Code:
typeset -i uid=$(id -u)
case $uid in
 0|210|999) : OK;;
 *) > .sh_history
    exec csession ENSEMBLE -U HHM "^ZU";;
esac

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top