Policy Server :: Snmp Agent : How to set it as a service on Linux and run as a specific user ?

book

Article ID: 96969

calendar_today

Updated On:

Products

CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On SOA Security Manager (SiteMinder) CA Single Sign-On

Issue/Introduction



We want to run the Policy Server Snmp Agent and we have 3 questions :

1 - The script /etc/init.d/NetegrityAgent has no start/stop values; 
    Plus it can't be registered as service.
    How can we make this script registered as service in Unix ?

2 - The SNMP service will not start on server boot, as symlink only to
    runlevel 5 and system by default run on runlevel 3. How can we
    make it starting at runlevel 3 ?

3 - The SNMP service is executed as root, and it calls another script
    /opt/CA/siteminder/etc/snmp/conf/RunSubagent.sh which also
    executes as root java commands. How can we make it running for a
    specific user ?

Environment

Release: MSPSSO99000-12.8-Single Sign-On-for Business Users-MSP
Component:

Resolution

1 - In Linux, you have a service in order to start specific script :

  start shell script at boot time in linux redhat 
  https://stackoverflow.com/questions/30389938/start-shell-script-at-boot-time-in-linux-redhat?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa 

2 - The solution given in 1 will apply for runlevel 3. 

3 - If you want to use a specific user, then you need to allow this 
    user to : 

    access port 8001 AGENTPORT=8001 
    access and execute files under INSTALL_HOME 
    execute the jvm JAVA_HOME