Topic
  • 1 reply
  • Latest Post - ‏2008-11-05T13:44:47Z by D.Varoun
D.Varoun
D.Varoun
2 Posts

Pinned topic sudo stop WAS cannot work in script

‏2008-11-05T09:25:24Z |
Hi all,
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
Dimos
Updated on 2008-11-05T13:44:47Z at 2008-11-05T13:44:47Z by D.Varoun
  • D.Varoun
    D.Varoun
    2 Posts

    Re: sudo stop WAS cannot work in script

    ‏2008-11-05T13:44:47Z  
    If this can help, I also post the relative log messages from /var/log/messages when I run the specific script:

    
    Nov  5 15:17:08 linux-1 su: (to <Me>) root on /dev/pts/1 Nov  5 15:18:05 linux-1 sudo: <Me> : TTY=pts/1 ; PWD=/home/<Me>/bin ; USER=root ; COMMAND=<WAS_HOME>/profiles/AppSrv01/bin/stopServer.sh server1 -username <uid> -password <passwd>