Tag : compliance settings

Using SCCM Compliance Settings to Install ESET on Macs

Again, another shell script to install ESET using SCCM compliance settings on Macs

Discovery Script:

#!/bin/bash

# Rui Qiu’s  ESET Script
# V1
# 11012015
FOLDER=/Library/Application\ Support/ESET/esets

if [ -d “$FOLDER” ];
then
echo 1
else
echo 0
fi

Remediation Script:

#!/bin/bash

# Ray Qiu’s  ESET Script
# V1
# 11022015
# Download Installer
curl http://xxx.com/tools/eset.zip -o /tmp/eset.zip

#Unzip
sudo unzip /tmp/eset.zip -d /tmp

# Install
sudo installer -pkg /tmp/eset.mpkg -target /

# Remove installer
sudo rm -r /tmp/eset.mpkg
sudo rm /tmp/eset.zip

 


Using SCCM Compliance Settings to Install Root Certificate on Macs

Here is one of my old shell scrips…it is very hard to use sccm to manage Macs, as Microsoft really doesn’t support Mac platform that well…last year, I even discovered a bug that SCCM has…and they gave me free credit for that support case 🙂

Discovery Script:

#!/bin/bash

# Rui Qiu’s Root CA Script
# V3
# 07212015
FILE=/var/sccm/cert.txt

if [ -f $FILE ];
then
echo 1
else
echo 0
fi

Redemption Script:

#!/bin/bash

# Rui Qiu’s Root CA Script
# V3
# 07212015
# Download Root Cert
curl http://xxx.com/tools/root.cer -o /tmp/root.cer

# Add cert
sudo security add-trusted-cert -d -r trustRoot -k “/Library/Keychains/System.keychain” “/private/tmp/root.cer”
# Create custom folder and copy file
sudo mkdir -p /var/sccm
sudo curl http://xxx.com/tools/cert.txt -o /var/sccm/cert.txt

# Remove cert
sudo rm /tmp/root.cer