Skip to content

Instantly share code, notes, and snippets.

View jhbush's full-sized avatar

Jason Bush jhbush

  • Coffee Cats Consulting
  • San Francisco Bay Area
  • 03:46 (UTC -08:00)
  • X @jasonhbush
View GitHub Profile
@jhbush
jhbush / createadminuser.sh
Created July 10, 2012 23:51
Create User Script
#!/bin/bash
# This script creates a user account under Mac OS X
# === Typically, this is all you need to edit ===
USERNAME=
FULLNAME=
PASSWORD=
# A list of (secondary) groups the user should belong to
#
# Generated automatically from man.conf.in by the
# configure script.
#
# man.conf from man-1.6c
#
# For more information about this file, see the man pages man(1)
# and man.conf(5).
#
# This file is read by man to configure the default manpath (also used
@jhbush
jhbush / csv_import.sh
Created December 4, 2014 23:29
csv_import_jamf_api
#!/bin/bash
apiUser=ladmin
apiPass=jamf1234
deptList=/Users/ladmin/Desktop/departments.csv
jssURL='https://jssjbush.local:8443'
echo $jssURL
#:Read variables from departments.csv:#
JAMF Helper Help Page
Usage: jamfHelper -windowType [-windowPostion] [-title] [-heading] [-description] [-icon] [-button1] [-button2] [-defaultButton] [-cancelButton] [-showDelayOptions] [-alignDescription] [-alignHeading] [-alignCountdown] [-timeout] [-countdown] [-iconSize] [-lockHUD] [-startLaunchd] [-fullScreenIcon] [-kill]
-windowType [hud | utility | fs]
hud: creates an Apple "Heads Up Display" style window
utility: creates an Apple "Utility" style window
fs: creates a full screen window the restricts all user input
WARNING: Remote access must be used to unlock machines in this mode
ciphers="TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA"
@jhbush
jhbush / cipher.sh
Last active August 29, 2015 14:25 — forked from opragel/cipher.sh
#!/bin/bash
# It's your funeral
LINUX_SERVER_XML_PATH="/usr/local/jss/tomcat/conf/server.xml"
LINUX_SERVER_XML_BACKUP_PATH="/usr/local/jss/tomcat/conf/server.xml.bak"
MAC_SERVER_XML_PATH="/Library/JSS/Tomcat/conf/server.xml"
MAC_SERVER_XML_BACKUP_PATH="/Library/JSS/Tomcat/conf/server.xml.bak"
if [ -f "$LINUX_SERVER_XML_PATH" ]; then
service jamf.tomcat7 stop
cp "$LINUX_SERVER_XML_PATH" "$LINUX_SERVER_XML_BACKUP_PATH"
sed -i 's/ciphers=".[^"]*/ciphers="TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_RSA_WITH_AES_256_CB
@jhbush
jhbush / office-2016-post-install.sh
Last active April 13, 2016 14:28 — forked from rtrouton/gist:18231c5065bcd7f7e973
Office 2016 15.12.3 postinstall file
#!/bin/bash
# Determine working directory
install_dir=`dirname $0`
# Location of Microsoft Office 2016 Volume License file
office_license="$3/Library/Preferences/com.microsoft.office.licensingV2.plist"
@jhbush
jhbush / install_microsoft_office_15.12.3.sh
Last active April 24, 2017 08:25 — forked from opragel/laziest_install_microsoft_office2016.sh
install_microsoft_office_15.12.3.sh
#!/bin/bash
DOWNLOAD_URLS=( \
#Outlook
"http://download.microsoft.com/download/A/2/C/A2C967A4-8B34-48FE-BC3D-E6532CC2DCD0/Microsoft_Outlook_15.12.3_Updater.pkg" \
# Word
"http://download.microsoft.com/download/8/F/0/8F0A32FB-A355-41D1-BBFB-55C734814787/Microsoft_Word_15.12.3_Updater.pkg" \
# Excel
"http://download.microsoft.com/download/8/F/4/8F4AB813-DEFA-4603-9397-D2C73F1EE5BF/Microsoft_Excel_15.12.3_Updater.pkg" \
# Powerpoint
"http://download.microsoft.com/download/3/3/9/33959026-296A-449D-97E3-3FA7944AC373/Microsoft_PowerPoint_15.12.3_Updater.pkg" \
@jhbush
jhbush / microsoft_outlook_mailbox_size_2011_2016.sh
Last active January 1, 2016 22:54
Microsoft Outlook Mailbox Size 2011 2016
#!/bin/bash
# Displays the size of Office for Mac 2011 and 2016 Outlook identities
echo "<result>"
UserList=$(dscl . list /Users UniqueID | awk '$2 > 1000 { print $1 }')
for u in $UserList;
do
@jhbush
jhbush / office2016.postinstall.sh
Created August 17, 2015 20:37
Postinstall script for use with Packages.app. Credit to rtrouton talkingmoose tvsutton franton
#!/bin/bash
# Script to install Office 2016 and stop the annoying AU Daemon first run message
# Based on work by https://derflounder.wordpress.com/2015/08/05/creating-an-office-2016-15-12-3-installer/
# and http://macops.ca/disabling-first-run-dialogs-in-office-2016-for-mac/
# And on work by http://www.officeformachelp.com/ (the removal script for office 2011)
# Massive amounts of work also done by the MANY admins on Slack MacAdmin #microsoft-office
# Author : [email protected]