Skip to content

Instantly share code, notes, and snippets.

View joshua-d-miller's full-sized avatar

Joshua D. Miller joshua-d-miller

View GitHub Profile
@joshua-d-miller
joshua-d-miller / java7u51exception
Created January 20, 2014 17:04
Java 7 Update 51 Exception.sites script to allow all users to modify the file as well as add your own on the administrative side. Use as postinstall_script.
#!/bin/sh
# Java script to add the exception.sites in a shared location for the
# new version of Java. Script created and updated by Josh Miller and
# Matt Hansen. Last update January 20, 2014.
# This command will check to see if the Java Deployment directory
# exists. If not, it will create it for you.
test -d /Library/Application\ Support/Oracle/Java/Deployment || mkdir -p /Library/Application\ Support/Oracle/Java/Deployment
@joshua-d-miller
joshua-d-miller / ManifestCheck
Last active August 29, 2015 14:02
Check for manifest and create one if it doesn't exist (Munki)
#!/bin/bash
# Determine if a manifest exists for the computer
username=""
encpassword=""
password=`echo "$encpassword" | base64 --decode`
/bin/mkdir /Volumes/client\ manifests
/sbin/mount_afp afp://$username:$password@servername/munki/repo/manifests/hosts /Volumes/client\ manifests
path="/Volumes/client manifests/$computername"
if [[ -e $path ]]
@joshua-d-miller
joshua-d-miller / ADExCheck.sh
Created June 23, 2014 21:33
Check for Exchange Account AD
#!/bin/bash
/usr/bin/dscl -plist /Active\ Directory/Domain/All\ Domains -read /Users/username > /tmp/Exchange.plist
if /usr/bin/defaults read /tmp/Exchange dsAttrTypeNative:msExchHomeServerName
then
echo "Yes"
else
echo "No"
fi
@joshua-d-miller
joshua-d-miller / NASA Eye's Visualization
Created March 24, 2015 12:22
makepkginfo -f explorer-mac
<?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>_metadata</key>
<dict>
<key>created_by</key>
<string>jdm51</string>
<key>creation_date</key>
<date>2015-03-24T12:22:12Z</date>
#!/bin/bash
# Script to perform Adobe Creative Cloud Updates using AAMPORTER
# Joshua D. Miller - [email protected]
# February 16, 2015
# Creative Cloud 2013 (First Creative Cloud Version)
/bin/echo "Checking for Updates for Creative Cloud"
/Volumes/RAID3L/aamporter/./aamporter.py -p /Volumes/RAID3L/aamporter/2013/Audition.plist --munkiimport \
/Volumes/RAID3L/aamporter/./aamporter.py -p /Volumes/RAID3L/aamporter/2013/Bridge.plist --munkiimport \
/Volumes/RAID3L/aamporter/./aamporter.py -p /Volumes/RAID3L/aamporter/2013/Dreamweaver.plist --munkiimport \
#!/usr/bin/python
# pylint:disable=C0103, E0611, E1101, W0703
'''Power User Preferences (With Location Services)'''
# This policy will unlock certain system prereference
# panes in macOS to allow users who do not have administrative
# privileges to access them.
# Joshua D. Miller - [email protected]
# The Pennsylvania State University
# August 31, 2016 - Converted from Bash
# April 4, 2017 - Updates Location Services and tested with 10.12.4
@joshua-d-miller
joshua-d-miller / 802.1x Fix.py
Last active January 18, 2019 12:46
When deploying an EAP-TLS profile for 802.1x Ethernet, this script will create a User Identity preference which will allow a logged in user to use any Ethernet interface that is connected to their machine.
#!/usr/bin/python
# pylint: disable=C0103, W0612, E1101, E0602, E0611
# pylint: disable=W0101, W0110, W0141
''''Fix 802.1x When Using Config Profiles and EAP-TLS'''
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# This script will determine the profile ID that was used when
# installing the 802.1x Ethernet Identity preference and make
# a copy of the keychain entry to be used as a user identity preference
# so that any Ethernet can be used when a user is logged in. As of 10.12.3
@joshua-d-miller
joshua-d-miller / 802.1x Read.py
Last active March 1, 2017 18:14
This script can be used an extension attribute in jamf that will determine if the User Identity Preference is present on the system with an 802.1x EAP-TLS profile. Note: Make this script have the same exclusion and target policy as your configuration profile.
#!/usr/bin/python
# pylint: disable=C0103, W0612, E1101, E0602, E0611
# pylint: disable=W0101, W0110, W0141
''''Report presence of 802.1x User Identity Preference for EAP-TLS'''
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# This script will determined if the KeyChain item that needs created
# for 802.1x EAP-TLS to work on all systems with multiple items is
# present. This information is then reported to jamf.
#
@joshua-d-miller
joshua-d-miller / 802.1x System Fix.py
Last active February 4, 2022 14:42
This script will allow your 802.1x Configuration Profile to work on any other Ethernet interface at the System Level
#!/usr/bin/python
# pylint: disable=E0611, E1101, E0602
''''Fix 802.1x When Using Config Profiles and PEAP-MSCHAPV2 or EAP-TLS'''
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# This script will find the system profile that is attached to one ethernet
# interface from our configuration profile and then copy it to all other
# ethernet interfaces so that other ethernet interfaces can be used instead
# of just the FirstActiveEthernet at time of profile installation. This issue
# is still an issue as of 10.12.3
@joshua-d-miller
joshua-d-miller / 802.1x Extension Attribute.py
Last active December 17, 2020 16:17
This will read all Ethernet interfaces on a system and determine based on what you call your 802.1x Profile if it is present on all Ethernet interfaces and report it into jamf as a string. You can then create a SMART group that looks for the word false so if any are false you can then use a policy to make the profile apply to all interfaces
#!/usr/bin/python
# pylint: disable=E0611, E1101, E0602, C0103
''''Fix 802.1x When Using Config Profiles and PEAP-MSCHAPV2 or EAP-TLS'''
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# This script will find the system profile and determine whether it is attached
# to each interface and report that information. This is formated to be used
# with jamf as an Extension attribute. Expected output would be as follows:
# || en3 - True || en4 - False || en5 - False ||
#