Skip to main content

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/

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.


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

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?


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


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.


Thanks for everything on help and everything is working great.


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


@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


I haven't tested this much, but



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


seems to work.


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


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?


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


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. 


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


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

 


Reply