Start and Shutdown operations fail for EAP instance from JON when sudo is used as script prefix

Solution Unverified - Updated -

Issue

  • sudo asking for password
  • Using script prefix of /usr/bin/sudo -u userid does not appear to work because sudo still asks for a password even though the user who started the platform's agent has valid sudo rights
  • Start and stop script for EAP instance fail to work with Script Prefix defined as /usr/bin/sudo -u userid

Environment

  • JBoss Operations Network (JON) 2.3
  • JBoss Enterprise Application Platform (EAP) 4.2, 4.3, 5.0
  • Red Hat Enterprise Linux 4, 5
  • /etc/sudoers configured to allow JON Agent user to RunAs another user with no password required

        jonadmin     jonagent-host=(jbossadmin)  NOPASSWD: /opt/jboss-eap-4.3/jboss-as/bin/*MyConfig*.sh
    
  • JBoss AS Server resource configured with

    • Script Prefix: /usr/bin/sudo -u jbossadmin
    • Start Script: bin/start-MyConfig.sh
    • Stop Script: bin/stop-MyConfig.sh
  • start-MyConfig.sh and stop-MyConfig.sh scripts which invoke standard bin/run.sh and bin/shutdown.sh

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content