Enabling sensor auto-start on a Linux system
The following procedure has been tested with Red Hat® Enterprise Linux®; there might be some variation for other Linux varieties. Review these steps with your system administrator before you make any changes.
To enable OpenText ScanCentral SAST sensor auto-start on a Linux system:
- Log in to the machine as “root.”
-
Run the
visudocommand to edit thesudoersfile and disable requiretty.Defaults !requiretty
You can also disable requiretty per user.
-
Create a systemd service unit file:
-
Open a new file for the service:
vi /etc/systemd/system/scancentral-sensor.service
-
Add the following content, and modify the paths, token, and username as needed:
[Unit] Description=Fortify ScanCentral SAST Sensor [Service] User=<username> Environment="SAST_LOCATION=<sast_install_dir>" "SCANCENTRAL_VM_OPTS=-Dworker_auth_token=<worker authentication token>" ExecStart=<client_install_dir>/bin/scancentral -url <controller_url> worker StandardOutput=append:<client_install_dir>/bin/workerout.txt StandardError=append:<client_install_dir>/bin/workerout.txt WorkingDirectory=<working_dir> Restart=on-failure [Install] WantedBy=multi-user.target- The <working_dir> should be a directory that the <username> has write permissions to.
- The SCANCENTRAL_VM_OPTS environment variable can be used to set additional sensor properties. For more information, see Configuring sensor properties.
-
-
Reload the systemd and enable the service:
systemctl daemon-reload systemctl enable scancentral-sensor systemctl start scancentral-sensor -
Check the setup:
-
Reboot and log in to the machine as "root".
-
To verify the processes under root, type:
ps -x | grep javaVerify that the output shows that the sensor is not started under root.
-
To verify the processes under the user, type:
sudo -u <username> ps x | grep javaVerify that the output displays the sensor process.
-
To verify the existence and contents of the script output file, type:
tail -f <client_install_dir>/bin/workerout.txtThe file/bin/workerout.txt must match what was configured for the StandardOutput and StandardError in the scancentral-sensor.service For example:
tail -f /home/<username>/Fortify/Fortify_ScanCentral_Client_25.4.0_x64/bin/workerout.txt
-