This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Scan and Remove False Google Docs Tokens | |
# Assumes GAM is installed. Change the path if you need to. | |
###################################[ VARIABLE DEFINITIONS ]################################## | |
#set -x | |
runINT="3600" #seconds | |
runDATE=$(date +%d-%m-%Y-%H-%M) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import pwd | |
from Foundation import CFPreferencesAppSynchronize | |
from Foundation import CFPreferencesSetValue | |
from Foundation import kCFPreferencesCurrentUser | |
from Foundation import kCFPreferencesCurrentHost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Jamf Pro - Determine Execution Environment | |
""" | |
import os | |
def is_running_directly(): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getusers(): | |
'''get all non-system users on this Mac''' | |
cmd = ['dscl', '.', '-list', '/Users'] | |
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
out, _ = proc.communicate() | |
userlist = out.splitlines() | |
users = [] | |
filter_out = ['daemon', 'root', 'nobody'] | |
for user in userlist: | |
if not user.startswith('_') and not user in filter_out: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# modified from original by Rich Trouton | |
# https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/block_root_account_login | |
ERROR=0 | |
# Set root password to some uuid, eg. 1730DFA3-C59B-447C-BAE8-3C3F052862A4 | |
rootpassword=$(uuidgen) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
factoid = 'opendirectoryd_version' | |
def fact(): | |
''' | |
Returns the "project version" number used to build opendirectoryd | |
per https://support.apple.com/en-gb/HT208315 to check that | |
"Security Update 2017-001" is installed | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>AutoOpenSafeDownloads</key> | |
<false/> | |
<key>DomainsToNeverSetUp</key> | |
<array> | |
<string>aol.com</string> | |
<string>facebook.com</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
import subprocess | |
def run_jamf_policy(p): | |
"""Runs a jamf policy by id or event name""" | |
cmd = ['/usr/local/bin/jamf', 'policy'] | |
if isinstance(p, basestring): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>PayloadContent</key> | |
<array> | |
<dict> | |
<key>PayloadDescription</key> | |
<string></string> | |
<key>PayloadDisplayName</key> |