Page 1 of 2
Patching a few Linux boxes
Posted: Fri Jun 30, 2023 1:14 pm
by Cubert
Can you please share the steps for us to be able to Patch few of the Linux servers using LUM as when we are clicking on Open Agent Console in LUM then it opens up the dashboard for the machine.
- Picture1.png (42.54 KiB) Viewed 2156 times
- Picture2.png (76.12 KiB) Viewed 2156 times
Can you please share the more details?
Re: Patching a few Linux boxes
Posted: Fri Jun 30, 2023 3:22 pm
by Cubert
I started to answer this question when I noted that our team had updated our Automate host recently and did not put LUM on the new host. So what better time to document a quick walk through to get plugin running, right? Well seems we have a few issues they have come up that has caused me to review the process we deploy to get data from agents and how it goes about updating agents.
So bare with me as I take a little time (24 hours) to revamp some functions and provide a little better view in to the agent updates.
I would like to see a list of packages available, the current version installed and the available version. Then I would also like to see a clear ability to push updates manually from main console.
There is already a manual update function under the agents console -> plugins -> Linux Update Manager.
Re: Patching a few Linux boxes
Posted: Fri Jun 30, 2023 9:02 pm
by isingh
We have updated the Plugin Successfully which is 1.0.23
Please share the further steps
Re: Patching a few Linux boxes
Posted: Fri Jun 30, 2023 9:33 pm
by Cubert
Should be 1.0.25. Correct? This is the latest build.
Re: Patching a few Linux boxes
Posted: Mon Jul 03, 2023 3:47 pm
by Cubert
I just released build 1.0.26
Get build here:
https://delivery.shopifyapps.com/-/c496 ... 9b904a2348
In this build we correct an issue where (YUM) agents current versions and Available versions are switched under the agent plugins view.
This fix requires that the agent replaces the LUM.sh file. If after update and a full scan of the (YUM) agents the view remains the same and versions are swapped then you will need to manually remove the file and rerun scan. The scan will see the file is missing and will replace it with new file.
Simply open the agent console and select "Begin" to open menu strip, under tools will be run command, select this function. In newly made command window paste the following command to remove file.
You can also edit the
LUM Maintenance Services script in the /scripts/maintenance/ script directory
Disable line 5 and enable line 7 will force the script to update on every run of script. This is fine but adds a few steps to script. Once your comfortable that all changes are made then you can revert your changes and speed up the script by 3 commands.
Green: Enable Function
Red: Disable Function
- Screenshot 2023-07-03 114301.jpg (57.11 KiB) Viewed 2092 times
Re: Patching a few Linux boxes
Posted: Wed Jul 12, 2023 3:33 pm
by maxgruv
I just installed this plugin (build 1.0.26) and am running it for the first time. On one of my Linux systems it scans for updates fine, but on another one the LUM Maintenance Services script fails. Output shows
packages -> [sh: 1: /root/LUM/lum.sh: not found]
I tried disabling Step 5 and enabling Step 7 in the script to see if that would help, but same result on rescan. Any suggestions? I'm on Automate 2023.5, the working scan is running on Debian 11.0 and the failing scan on Debian 9.13.
Re: Patching a few Linux boxes
Posted: Wed Jul 12, 2023 8:04 pm
by Cubert
Well the error says it cant find the file written in line 8.
So first test to see if line 6 actually created the directory "/root/LUM"
command line execute
Should list all items in the /root directory, see if LUM exists.
Next if LUM exists see if /root/LUM/LUM.sh exists
command line execute
If neither of these exist or only one exists then you have a permissions problem writing to that agent. Open up agent console and select to run command line tool.
Execute
and see what user you report as. It should be "root"
post findings here...
Re: Patching a few Linux boxes
Posted: Thu Jul 13, 2023 4:41 pm
by maxgruv
Thanks @cubert, I ran the commands and verified the file does exist in the desired location. Output below:
#ls -al /root
total 40
drwx------ 6 root root 4096 Jul 12 07:59 .
drwxr-xr-x 23 root root 4096 May 8 2019 ..
drwxrwxrwx 2 root root 4096 Aug 25 2020 apt-get
-rw------- 1 root root 447 Jul 11 14:13 .bash_history
-rw-r--r-- 1 root root 570 Jan 31 2010 .bashrc
drwx------ 3 root root 4096 Apr 30 2020 .cache
drwxr-xr-x 3 root root 4096 Jul 30 2020 .java
drwxr-xr-x 2 root root 4096 Jul 12 08:28 LUM
-rw-r--r-- 1 root root 148 Aug 17 2015 .profile
-rw-r--r-- 1 root root 180 May 8 2019 .wget-hsts
#ls -al /root/LUM
total 12
drwxr-xr-x 2 root root 4096 Jul 12 08:28 .
drwx------ 6 root root 4096 Jul 12 07:59 ..
-rwxrwxrwx 1 root root 2553 Jul 12 08:28 lum.sh
Also to confirm, the commands above were run via Automate prompt, which runs as root:
#whoami
root
Re: Patching a few Linux boxes
Posted: Mon Jul 17, 2023 1:13 pm
by Cubert
Hmm.
Then why would script report ([sh: 1: /root/LUM/lum.sh: not found]) is the lum.sh set as executable?
on line 22 we execute
If you run this on agent what is output?
Re: Patching a few Linux boxes
Posted: Wed Jul 19, 2023 8:46 pm
by maxgruv
Cubert wrote: ↑Mon Jul 17, 2023 1:13 pm
Hmm.
Then why would script report ([sh: 1: /root/LUM/lum.sh: not found]) is the lum.sh set as executable?
on line 22 we execute
If you run this on agent what is output?
Tried that and got the same result:
#/root/LUM/lum.sh SCAN
sh: 1: /root/LUM/lum.sh: not found