LastPass Install Script

lpadmin
Contributor

I am trying to do a silent install of LastPass on our Macbooks, I am following the instructions from this link. I downloaded the pkg and created a dmg using composer which will put the LastPass pkg in the users downloads folder. I then run a policy that runs the following script

sudo installer -pkg lpmacosx.pkg -tgt /

This is where I am having the issue, the policy fails stating that the package path specified was invalid: 'lpmacosx.pkg'. I do not know much about scripting but I am wondering if I am supposed to put the location of the pkg in the script for it to run properly. Any help is much appreciated.

1 ACCEPTED SOLUTION

mm2270
Legendary Contributor III

Any reason you can't just use the lpmacosx.pkg as is?

If not, the problem with your command above is that installer command line needs the full path to wherever the installer package is on disk to work. Just specifying "lpmacosx.pkg" isn't going to work because the script isn't operating on the client from the same directory as the cached package, so it can't actually locate the package to install.

The command would need to be something like:

installer -pkg /full/path/to/installer/lpmacosx.pkg -tgt /

View solution in original post

7 REPLIES 7

jhbush
Valued Contributor II

@lpadmin Skip the sudo. The installer is running as root. I also found a standard package installer here that shouldn't require Composer. LastPass Enterprise There are also lots of install flags listed at the bottom of the page.

lpadmin
Contributor

I removed sudo from the script and got the same error.

mm2270
Legendary Contributor III

Any reason you can't just use the lpmacosx.pkg as is?

If not, the problem with your command above is that installer command line needs the full path to wherever the installer package is on disk to work. Just specifying "lpmacosx.pkg" isn't going to work because the script isn't operating on the client from the same directory as the cached package, so it can't actually locate the package to install.

The command would need to be something like:

installer -pkg /full/path/to/installer/lpmacosx.pkg -tgt /

lpadmin
Contributor

Installing the pkg as is does not work silently, that was the first thing that I tried.

Putting in my full path worked thought thanks.

MischaB
New Contributor II
New Contributor II

Hello @lpadmin I was wondering what your workflow is for LastPass.
we are testing the deployment and want to make a silent install of LastPass.

rcamacho
New Contributor II

Do you guys have a recommended workflow on installing LastPass? I've been tasked by our Security team to install this on Safari, Chrome and Firefox.

donmontalvo
Esteemed Contributor III

Interesting thread, especially the vendor provided admin level installer options.

On a side note, wasn't aware -tgt was an option, must have wasted a million keystrokes. :)

Lastly, interesting comparison, LastPass seems to lead the pack...

--
https://donmontalvo.com