Skip to main content
Question

Lansweeper Agent

  • March 21, 2019
  • 15 replies
  • 128 views

Forum|alt.badge.img+4
  • Contributor
  • 10 replies

Just wondering if anyone has configured the Lansweeper agent for deployment on OSX yet. I tried to use Composer to capture the dmg install, but I'm not seeing the device agent checking in. I fear that it has copied the config of the Composer machine and that is how it is reporting.

Here is the documentation on the package if anyone can think of hints: https://www.lansweeper.com/knowledgebase/silently-installing-lsagent-on-a-windows-linux-or-mac-computer/

15 replies

Forum|alt.badge.img+3
  • New Contributor
  • 4 replies
  • June 6, 2019

It's been a while since I've done it (before JAMF) but I know I had to enable SSH for it to communicate, not sure if it's still the case or not. I then modified the sshd_config file to only allow a specific account access to ssh.

I'm starting to work on it now for JAMF, hence me showing up here. Did you ever get this to work? I'll report back with my findings.


Forum|alt.badge.img+13
  • Valued Contributor
  • 268 replies
  • June 6, 2019

The "new" LSAgent doesn't require SSH anymore.
Create a package that drops LsAgent-osx.app somewhere on the disk and add a postinstall script like this:

/path/to/LsAgent-osx.app/Contents/MacOS/installbuilder.sh --server $yourServer --port $yourPort --agentkey $yourKey --prefix /path/to/install/dir --mode unattended

kevin_v
Forum|alt.badge.img+10
  • Valued Contributor
  • 59 replies
  • June 7, 2019

I was able to get the lsagent installed during our build sequence via @Chris script above, however we do get the "App not optimized" notification if we trigger the policy while a user is logged in.

What is the best method for running a policy only when no one is logged in? At log off?


kevin_v
Forum|alt.badge.img+10
  • Valued Contributor
  • 59 replies
  • June 7, 2019

Forgot to mention I tried disabling the 32bit warnings in that 2nd line of the terminal window without success.


Forum|alt.badge.img+13
  • Valued Contributor
  • 268 replies
  • June 11, 2019

In Mojave, you need to target the

com.apple.coreservices.uiagent
domain to suppress the warning,
here's a profile to do that.
The installer is 32bit. Contact LanSweeper support, there is an open Bug Report you can add your voice to ;)
The agent itself is 64bit.


Forum|alt.badge.img+1
  • New Contributor
  • 3 replies
  • November 5, 2019

Thanks for everything on help and everything is working great.


Forum|alt.badge.img+13
  • Valued Contributor
  • 268 replies
  • November 6, 2019

@mookman1 you need to create a package that installs the

LsAgent-osx.app

to a temporary location on disk, e.g. /private/tmp.
Add a postinstall script with

#!/bin/bash
/private/tmp/LsAgent-osx.app/Contents/MacOS/installbuilder.sh --server $yourServer --port $yourPort --agentkey $yourKey --prefix /usr/local/LsAgent --mode unattended

rm -r /private/tmp/LsAgent-osx.app

That will install the agent to /usr/local/LsAgent.


Forum|alt.badge.img+1
  • New Contributor
  • 3 replies
  • November 27, 2019

@Chris

Thank for you for script. it's working great. I was able to install lsagent and then having rm -r /private/tmp/LsAgent-osx.app removed the app where the software still is installed

would have you a script to remove the software if needed at a later time if we no longer need the software to be installed?

Thanks again for your help


Forum|alt.badge.img+13
  • Valued Contributor
  • 268 replies
  • November 28, 2019

I haven't tested this much, but

/usr/local/LsAgent/uninstall.app/Contents/MacOS/installbuilder.sh --mode unattended

seems to work.


Forum|alt.badge.img+1
  • New Contributor
  • 3 replies
  • December 13, 2019

@Chris We have workspace One to completed this install. Would you know how to setup that up with workspace one for the install and the uninstall?


Forum|alt.badge.img
  • New Contributor
  • 1 reply
  • May 18, 2020

I know this is several months old, but having a problem creating a package that installs the LsAgent-osx.app to /private/tmp. I can extract the file from the dmg, but using composer and taking a snapshot it does not pickup the fact that I put LsAgent-osx.app in the /private/tmp folder.

Any help here?


Forum|alt.badge.img+1
  • New Contributor
  • 2 replies
  • March 18, 2023

3 year old post still getting it done. Thank you Chris and mookman1. Ya'll helped me get things working.


Forum|alt.badge.img+1
  • New Contributor
  • 2 replies
  • March 18, 2023

I know this is several months old, but having a problem creating a package that installs the LsAgent-osx.app to /private/tmp. I can extract the file from the dmg, but using composer and taking a snapshot it does not pickup the fact that I put LsAgent-osx.app in the /private/tmp folder.

Any help here?


Run Composer and place the .app file in a local folder.(I.E. user/local/)

Once composer has captured it right-click on the folders and rename to the hidden private/tmp folder structure. 


Forum|alt.badge.img
  • New Contributor
  • 1 reply
  • April 28, 2023

It there any way to install Lans agent to Linux server without any GUI by using CLI?


kevin_v
Forum|alt.badge.img+10
  • Valued Contributor
  • 59 replies
  • May 11, 2023

It there any way to install Lans agent to Linux server without any GUI by using CLI?


Sure:

LsAgent-linux-x64.run --agentkey 4c2db649-014a-41f5-a01d-08950d7af --mode unattended

 Link: https://community.lansweeper.com/t5/scanning-your-network/silently-installing-lsagent-on-a-windows-linux-or-mac-computer/ta-p/64474