Skip to content

Instantly share code, notes, and snippets.

@gmarnin
gmarnin / gist:615f7e8d209f6031e2960027582e9f80
Created April 4, 2016 13:04
Delete account after 30 days config profile
<?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>PayloadDisplayName</key>
<string>Mobility</string>
<key>PayloadEnabled</key>
#!/bin/bash
# This script works well for removing local accounts that are older than 1 day.
# Obviously the 1 day timeframe can be modified (-mtime +1).
# Runs using Launch Daemon - /Library/LaunchDaemons/edu.org.deleteaccounts.plist
# version .7
@gmarnin
gmarnin / gist:37265c0c37ebbcb9f14818033b78e2d2
Created December 18, 2018 17:07
T2 10.14.2 update, MSC log from 3.5.2.3630
Dec 18 2018 11:33:39 -0500 Using manifest: site_default
Dec 18 2018 11:33:39 -0500 DEBUG2: Catalog base URL is: https://domain/munki/catalogs/
Dec 18 2018 11:33:39 -0500 Getting catalog production...
Dec 18 2018 11:33:39 -0500 DEBUG2: Options: {'logging_function': <function display_debug2 at 0x108247aa0>, 'ignore_system_proxy': False, 'additional_headers': {u'Authorization': u'Basic aXRzXG1hY211bmtpOk1NMjAxNCNy', 'User-Agent': u'managedsoftwareupdate/3.5.2.3630 Darwin/18.2.0'}, 'file': u'/Library/Managed Installs/catalogs/production.download', 'cache_data': {
etag = "\"83f113e0c896d41:0\"";
"last-modified" = "Tue, 18 Dec 2018 11:57:39 GMT";
}, 'url': u'https://domain/munki/catalogs/production', 'follow_redirects': u'none', 'download_only_if_changed': True, 'can_resume': False}
Dec 18 2018 11:33:39 -0500 DEBUG2: URLSession_task_didReceiveChallenge_completionHandler_
Dec 18 2018 11:33:39 -0500 DEBUG2: Authentication challenge for Host: domain Realm: None AuthMethod: NSURLAuthenticationMethodSer
<?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.assistant.support</key>
@gmarnin
gmarnin / gist:e8e38d404eaf9a8158e02aa921417592
Created November 16, 2016 20:56
Bomber JC Scripts for Muni
<key>postinstall_script</key>
<string>#!/bin/sh
# Attach the Cached DMG from the Waiting Room
hdiutil attach -nobrowse -noverify /tmp/bomgar-scc-w0hdc308ewf5jf6z6eg7d8ewg5gx87yiizxxxwwc40jc90.dmg
# Install the client from the standard mount location for the bomgar-scc client installer.
/Volumes/bomgar-scc/Double-Click\ To\ Start\ Support\ Session.app/Contents/MacOS/sdcust&amp;
# If you want to run the hdiutil detach, add a wait command so that it finishes installing first
@gmarnin
gmarnin / gist:7c284bb297df11ea8958
Created November 11, 2014 20:57
last login time
#!/bin/sh
# Marnin, RU ITS, version .1, 11-2014
# Source: http://superuser.com/questions/65375/user-login-log-on-mac-os-x
echo
echo "Check the last login time for an account"
echo
@gmarnin
gmarnin / gist:9a914bed429d7b276b7e
Created October 15, 2015 15:35
xcode munki postinstall
<key>postinstall_script</key>
<string>#!/bin/sh
# enable developer mode
/usr/sbin/DevToolsSecurity -enable
# make sure all users on this machine are members of the _developer group
/usr/sbin/dseditgroup -o edit -t group -a everyone _developer
# accept Xcode license
@gmarnin
gmarnin / gist:bc5fc6d7f0935e9dcced
Created August 12, 2015 18:56
FinaleUpdate.munki
12mor101m3:~ autopkg$ autopkg run -vv FinaleUpdate.munki
Processing FinaleUpdate.munki...
SparkleUpdateInfoProvider
{'Input': {'appcast_url': u'http://downloads2.makemusic.com/xml/Finale_Mac.xml'}}
SparkleUpdateInfoProvider: Version retrieved from appcast: 5545
SparkleUpdateInfoProvider: User-facing version retrieved from appcast: 2014.4.0.5545
SparkleUpdateInfoProvider: Found URL http://makemusic.blob.core.windows.net/applications/Finale/2014d/Sparkle/FinaleUp2014dMac_5545.zip
{'Output': {'url': 'http://makemusic.blob.core.windows.net/applications/Finale/2014d/Sparkle/FinaleUp2014dMac_5545.zip',
'version': '2014.4.0.5545'}}
URLDownloader
@gmarnin
gmarnin / gist:00bb721744f8d2fef4f8
Created August 4, 2015 17:22
SEP 12.1.6 Pkginfo
<?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>munki-admin</string>
<key>creation_date</key>
<date>2015-07-06T15:58:47Z</date>
@gmarnin
gmarnin / gist:e17eb746e23d2e75fe1b
Created June 10, 2015 18:22
Radar 14023881 - FileVault 2: Allow encrypted password with fdesetup enable -inputplist
Summary:
When using fdesetup enable -inputplist to enable other accounts, the password in the plist is clear text. I would like to file an enhancement to have the -inputplist plist support hashed passwords.
Steps to Reproduce:
If you run fdesetup enable -inputplist with a hashed password, FileVault 2 is not enabled for the hashed password account.
Expected Results: