I am trying to stop Websphere Application Server using sudo utility in Linux:
sudo <WAS_HOME>/profiles/AppSrv01/bin/stopServer.sh server1 -username <uid> -password <passwd>
While running the above sudo command works perfectly from command line as user <Me>, when I put the same command into a shell script and try to run it as <Me> returns the following error:
ADMU0128I: Starting tool with the AppSrv01 profile ADMU3100I: Reading configuration for server: server1 ADMU0111E: Program exiting with error: javax.management.JMRuntimeException: ADMN0022E: Access is denied for the stop operation on Server MBean because of insufficient or empty credentials. ADMU4113E: Verify that username and password information is correct. If running tool from the command line, pass in the correct -username and -password. Alternatively, update the <conntype>.client.props file.
Also, here is a fraction of my sudoers file:
<Me> ALL= NOPASSWD: <WAS_HOME>/profiles/AppSrv01/bin/stopServer.sh
Any help in resolving this would be appreciated.
Thanks in advance