Lansweeper Agent

ctw
New Contributor III

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/

11 REPLIES 11

srogowski
New Contributor II

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.

Chris
Valued Contributor

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
Contributor

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.

e034771c18c64df793f2babcc84edde3

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

kevin_v
Contributor

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

Chris
Valued Contributor

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.

mookman1
New Contributor II

Thanks for everything on help and everything is working great.

Chris
Valued Contributor

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

mookman1
New Contributor II

@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

Chris
Valued Contributor

I haven't tested this much, but

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

seems to work.

mookman1
New Contributor II

@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?

Brian_Blater
New Contributor

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?