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 4/5/2019 | |
Version=1.4 | |
# Original source is from MigrateUserHomeToDomainAcct.sh | |
# Written by Patrick Gallagher - https://twitter.com/patgmac | |
# | |
# Guidance and inspiration from Lisa Davies: | |
# http://lisacherie.com/?p=239 | |
# | |
# Modified by Rich Trouton |
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 | |
# | |
# getosversionfromdmg.py | |
# | |
# Copyright (c) 2014 The Regents of the University of Michigan | |
# | |
# Retrieves the OS version and build from the InstallESD.dmg contained in | |
# a typical "Install (Mac) OS X <Name>.app" bundle. | |
# | |
# To run: |
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
'MacBookPro4,1' | |
'MacPro2,1' | |
'MacBookPro5,1' | |
'MacBookPro1,1' | |
'MacBookPro5,3' | |
'MacBookPro5,2' | |
'iMac8,1' | |
'MacBookPro5,4' | |
'iMac5,1' | |
'iMac5,2' |
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
MacBook9,1: 'Mac-9AE82516C7C6B903' | |
iMac14,1: 'Mac-031B6874CF7F642A' | |
iMac10,1: 'Mac-F2268DC8' | |
MacBookPro8,1: 'Mac-50619A408DB004DA' | |
MacBook6,1: 'Mac-F22C8AC8' | |
MacBookPro10,2: 'Mac-AFD8A9D944EA4843' | |
iMac12,2: 'Mac-942B59F58194171B' | |
iMac14,2: 'Mac-27ADBB7B4CEE8E61' | |
MacBook8,2: 'Mac-F305150B0C7DEEEF' | |
MacBookAir6,1: 'Mac-35C1E88140C3E6CF' |
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 | |
"""Enables location services, allows Maps and Timezone""" | |
import os | |
import platform | |
import subprocess | |
import sys | |
try: | |
sys.path.append('/usr/local/munki/munkilib/') | |
import FoundationPlist | |
except ImportError as error: |
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
# Tested on 10.11 | |
# Assumes your network is in a state to actually do the discovery | |
# (Generally this means wifi enabled on your device and network stack is up) | |
# | |
# Note: When this code exits, it will generate an error message - this is to be expected! | |
# Error will look like: | |
# Python[3056:158489] PyObjC: Exception during dealloc of proxy: Cannot remove an observer <TimeZonePref 0x7f846b4b6710> | |
# for the key path "enabled" from <ATZAdminPrefererences 0x7f846b502a30> because it is not registered as an observer. | |
# | |
# This is because we're cheating with the initialization of a TimeZonePref class to get cheap access to |
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 | |
import base64 | |
import getpass | |
import sys | |
import xml.etree.ElementTree as Et | |
import urllib | |
import urllib2 | |
reload(sys) |
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
https://docs.google.com/document/d/1wdtJO9TaRn_aGAYCyUizuydWsVVTncx3Ey2V66sjRwI/edit |
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
# This code must run as root | |
# We're mixing ObjC and C-style dylibs, so this is really fun | |
# The only reason we're doing this is that the OS is _really really_ picky about trying to do | |
# ANYTHING with the CoreStorage Family Properties CFDictionary that's in-memory EXCEPT for | |
# making a mutable copy of it. | |
# Once we've done that, we can bring it into pyObjC to play nicely with the data. | |
import objc |
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 | |
# Identify location of jamf binary. | |
jamf_binary=`/usr/bin/which jamf` | |
if [[ "$jamf_binary" == "" ]] && [[ -e "/usr/sbin/jamf" ]] && [[ ! -e "/usr/local/bin/jamf" ]]; then | |
jamf_binary="/usr/sbin/jamf" | |
elif [[ "$jamf_binary" == "" ]] && [[ ! -e "/usr/sbin/jamf" ]] && [[ -e "/usr/local/bin/jamf" ]]; then | |
jamf_binary="/usr/local/bin/jamf" |