This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Uninstalling SEC from all Macs via bash script

We're moving form SEC to Central.  I need to remove all the SEC installs on our Macs and then deploy Central.

I have the ability to run a bash script automatically on all our Macs when they check in with our management server (it's an in-house developed thing) but I'm having issues uninstalling SEC with the tamper password specified. 

This script is run at root level:

#!/bin/bash
cd /Library/Application\ Support/Sophos/opm/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer --remove --tamper_password "password"
exit 0

 

The installer.log shows:

Sophos Bootstrap[13373]: [SMESophosBootstrapAppDelegate.m:1656] System verified
Sophos Bootstrap[13373]: [SMESophosBootstrapAppDelegate.m:1760] Tamper protection password check failed.
Sophos Bootstrap[13373]: [SMESophosBootstrapAppDelegate.m:2125] Unsuccessful attempt to uninstall with tamper protection password
Sophos Bootstrap[13373]: [SMESophosBootstrapAppDelegate.m:198] Installation failed.

Running the script manually works, I'm only have issues when it's called from another script. Does anyone have a way of automating the removal of SEC from Macs with Tamper Protection installed? Looking at 650 machines in a short time frame so manual isn't a option.

 


This thread was automatically locked due to age.