Hi, I have a what I thought to be a simple task in creating a BigFix task to install an agent. But for some reason, I can’t get it to install. It says completed with exit code 127. This is what’s in my task. Any help\suggestions would be greatly appreciated.
Have you confirmed that the files you would expect are at /tmp/Rapid7? I’ll also note that there is seemingly a stray ) as the second to last character of your action. Maybe that’s causing a problem?
The code 127 is what is returned from the shell on the last ‘wait’ command. I think alinder is right with the parenthesis.
Another common issue is that scripts run with ‘sh’ generally aren’t run from a Login Shell, and often don’t have the $PATH you might expect.
Try using fully-qualified paths for binaries like sudo and unzip, or using /bin/sh --login -c “command” to run as a login shell (with a user environmentl.
The files are there so they do get downloaded. The stray ) was accidental in the copy and paste into this post. I’ve been trying many things for example I tried installing it from the download folder like this.
I’m thinking your second sentence is what’s happening here. Although, still not sure. As far as using fully qualified paths for binaries…could you give me an example of what it should look like for my task? Below is what I’m using right now. Sorry if this causes confusion. I still have the task from above, where I used the Mac Software Deployment Wizard to choose the zip file. I’ve tried a variety of things. But for what I have below, I’m using the windows software distribution wizard to pick up these files in this task. Will that work? Or…how would you suggest I upload this files so that I can prefetch them via a task\fixlet? Thanks again!
Hi Jason, just getting back around to this one. Unfortunately I’m still having issues. This is what I tried at your suggestion. Again, I used the windows software distribution wizard to upload the files to the BigFix Server.
//run the script
wait /bin/sh -c “(cd {pathname of download folder}/agents-linux/ && ./agent_installer.sh install_start)”
These are the instructions for the agent install from the vendor.
"To install the Insight Agent using the certificate package on Mac and Linux assets:
Fully extract the contents of your certificate package ZIP file. Make sure that the .sh installer script and its dependencies are in the same directory.
Run the following command in a terminal to modify the permissions of the installer script to allow execution:
chmod u+x agent_installer.sh
Lastly, run the following command to execute the installer script. The Insight Agent will be installed as a service and appear with the name “ir_agent” in your service manager:
sudo ./agent_installer.sh install_start"
Do you see my mistake, or have any other suggestions?
I don’t have a Linux box handy to test on, and I’m not certain how whether shell handles the multiple commands. I’d try to make it a little simpler by building a script and then running it. Along the lines of the following (after the extraction)
Yeah, in my original post, I was browsing out to the agents-linux.zip file as creating the task using the extracted agents-linux folder wasn’t working and giving me the 127 exit code. That’s why I was unzipping it. We got that same exit code for MAC’s. So browsing out to the zipped folder worked when we created this agent installer for MAC’s using the the MAC software distribution wizard.
Thanks for your reply. I found out from the vendor that the install has to run as root
“—The Linux agent/agentless approach requires a user with root permissions to get PID-to-network mapping, certain hardware details, and data on logical/physical disk volumes. Become root user either through “sudo -s” or “su”, most systems use sudo.”
I have tried again with your suggestions and it still is not working. The installation instructions as per their site does not have BigFix as an option to do the install and was hoping to try to make it work.