Skip to content

Instantly share code, notes, and snippets.

@rtrouton
rtrouton / gist:6198868
Created Aug 10, 2013
I've updated the create_vmware_osx_install_dmg.sh script that I had previously posted about. It now includes the ability to create an .iso file that can be used with VMware ESXi servers running on Apple hardware. When running the script, the user will now be asked if they want an ISO disk image for use with VMware ESXi. If the user selects Yes, …
View gist:6198868
#!/bin/sh
#
# Preparation script for a customized OS X installer for use with VWware Fusion
#
# What the script does, in more detail:
#
# 1. Mounts the InstallESD.dmg using a shadow file, so the original DMG is left
# unchanged.
# 2. minstallconfig.xml and PartitionInfo.plist are also copied, which is looked for by the installer environment's
# rc.* files that first load with the system. This allows us to never actually modify the
@rtrouton
rtrouton / gist:7107515
Created Oct 22, 2013
fdesetup additional users plist
View gist:7107515
<?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>Username</key>
<string>username</string>
<key>Password</key>
<string>password</string>
<key>AdditionalUsers</key>
<array>
@rtrouton
rtrouton / gist:7111637
Last active Jan 11, 2017
Updated create_vmware_osx_install_dmg.sh now includes support for Mavericks.
View gist:7111637
#!/bin/sh
#
# Preparation script for a customized OS X installer for use with VWware Fusion and ESXi
#
# What the script does, in more detail:
#
# 1. Mounts the InstallESD.dmg using a shadow file, so the original DMG is left
# unchanged.
# 2. minstallconfig.xml is also copied, which is looked for by the installer environment's
# rc.* files that first load with the system. This allows us to never actually modify the
@rtrouton
rtrouton / gist:7181799
Last active Dec 26, 2015
Disabling the iCloud sign-in pop-up message on 10.7.0 and higher The script below will disable the iCloud pop-up on Macs running 10.7.0 and higher. As of this time, the latest OS available is 10.9.0.
View gist:7181799
#!/bin/sh
# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
sw_vers=$(sw_vers -productVersion)
# Checks first to see if the Mac is running 10.7.0 or higher.
# If so, the script checks the system default user template
# for the presence of the Library/Preferences directory.
#
@rtrouton
rtrouton / gist:7238371
Last active Dec 27, 2015
Script to handle unbinding your Mac from one OpenLDAP server and moving to another. Also handles AD domains differently. If you are adapting this for your own use, run a search and replace for the following: "dc=replaceme,dc=org" (no quotes) You'll need to replace that with your own LDAP search base "ldap.server.goes.here" (no quotes) You'll nee…
View gist:7238371
#!/bin/sh
# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# Environment settings
LDAPdomain="new_ldap_server_here" # Fully qualified DNS of new LDAP server
oldLDAPdomain="old_ldap_server_here" # Fully qualified DNS of old LDAP server
oldADdomain="olddomain.com" # Fully qualified DNS name of the old Active Directory Domain
oldADdomainname="OLDDOMAIN" # Name of the old AD Domain as specified in the search paths
@rtrouton
rtrouton / gist:7252100
Created Oct 31, 2013
Profile for managing individual servers in the Safari browser plug-in whitelist
View gist:7252100
<?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>PayloadContent</key>
<dict>
<key>com.apple.Safari</key>
@rtrouton
rtrouton / gist:7252142
Created Oct 31, 2013
Profile for Safari plug-in management. Sets Java's PlugInFirstVisitPolicy fromPlugInPolicyBlock to PlugInPolicyAsk.
View gist:7252142
<?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>PayloadContent</key>
<dict>
<key>com.apple.Safari</key>
@rtrouton
rtrouton / gist:7829016
Created Dec 6, 2013
List of world-writable files and directories created by LabVIEW Pro 2013 installer
View gist:7829016
This file has been truncated, but you can view the full file.
606543 0 drwxrwxrwx 19 root admin 646 Dec 5 17:29 /Applications/National Instruments/LabVIEW 2013
643152 0 drwxrwxrwx 3 root admin 102 Jun 20 20:33 /Applications/National Instruments/LabVIEW 2013/AppLibs
643161 120 -rwxrwxrwx 1 root admin 58049 Jun 20 20:33 /Applications/National Instruments/LabVIEW 2013/AppLibs/lvapp.app/Contents/Resources/lvapp.icns
606598 0 drwxrwxrwx 19 root admin 646 Jun 20 20:33 /Applications/National Instruments/LabVIEW 2013/cintools
606599 136 -rw-rw-rw- 1 root admin 69594 Jun 20 20:33 /Applications/National Instruments/LabVIEW 2013/cintools/extcode.h
606600 32 -rw-rw-rw- 1 root admin 15438 Jun 20 20:33 /Applications/National Instruments/LabVIEW 2013/cintools/fundtypes.h
@rtrouton
rtrouton / gist:7997747
Created Dec 17, 2013
Script to delete user folder on login, make new home folder.
View gist:7997747
#!/bin/tcsh -f
##
############################ login.sh ###########################
# Mike Bombich | mike@bombich.com
# Copyright 2002 Mike Bombich.
# With the appropriate modification to /etc/ttys, this script will
# execute each time a user logs in.
##################################################################
@rtrouton
rtrouton / gist:8016797
Last active Jun 22, 2020
createmyguest.sh script, original by nbalonso (https://gist.github.com/nbalonso/5696340)
View gist:8016797
#!/bin/bash
# Original script by Noel B. Alonso: https://gist.github.com/nbalonso/5696340
#variables
DSCL="/usr/bin/dscl"
SECURITY="/usr/bin/security"
LOGGER="/usr/bin/logger"
# Determine OS version