Patching a few Linux boxes

This forums is to discuss issues and features of the Linux update Manager plugin for LabTech RMM
User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Patching a few Linux boxes

Post 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
Picture1.png (42.54 KiB) Viewed 1973 times

Picture2.png
Picture2.png (76.12 KiB) Viewed 1973 times

Can you please share the more details?

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Patching a few Linux boxes

Post 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.

isingh
Posts: 1
Joined: Fri Jun 30, 2023 12:06 pm

Re: Patching a few Linux boxes

Post by isingh »

We have updated the Plugin Successfully which is 1.0.23

Please share the further steps

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Patching a few Linux boxes

Post by Cubert »

Should be 1.0.25. Correct? This is the latest build.

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Patching a few Linux boxes

Post 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.

Code: Select all

rm -f /root/LUM/lum.sh
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
Screenshot 2023-07-03 114301.jpg (57.11 KiB) Viewed 1909 times

maxgruv
Posts: 8
Joined: Wed Aug 19, 2020 2:53 pm
3

Re: Patching a few Linux boxes

Post 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.

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Patching a few Linux boxes

Post 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

Code: Select all

ls -al /root
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

Code: Select all

ls -al /root/LUM
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

Code: Select all

whoami
and see what user you report as. It should be "root"

post findings here...

maxgruv
Posts: 8
Joined: Wed Aug 19, 2020 2:53 pm
3

Re: Patching a few Linux boxes

Post 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

User avatar
Cubert
Posts: 2457
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Patching a few Linux boxes

Post 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

Code: Select all

/root/LUM/lum.sh SCAN
If you run this on agent what is output?

maxgruv
Posts: 8
Joined: Wed Aug 19, 2020 2:53 pm
3

Re: Patching a few Linux boxes

Post 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

Code: Select all

/root/LUM/lum.sh SCAN
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

Post Reply

Return to “Linux Update Manager”