Skip to content

Instantly share code, notes, and snippets.

#Enable Apple Remote Desktop
$kicker -activate -configure -clientopts -setvnclegacy -vnclegacy no -setreqperm -reqperm yes -setmenuextra -menuextra yes
#Allow accesss only for specified users
$kicker -configure -allowAccessFor -specifiedUsers
#Enable DirectoryService-based logins
$kicker -configure -clientopts -setdirlogins -dirlogins yes
#Restart ARDAgent
$kicker -restart -agent
@poundbangbash
poundbangbash / gist:e9564d994ac9add782dc
Created February 5, 2015 03:19
Flash auto update discovery
Using a useragent of Adobe%20Flash%20Player%20Install%20Manager/16.0.0.296
Trying to access http://fpdownload2.macromedia.com/get/flashplayer/update/current/xml/version_en_mac_pl.xml
Loads the document - stating 16,0,0,296 is current.
<XML>
<update version="16,0,0,296">
<description>
mshtml:
<font face="sans-serif">
<p>
https://fpdownload.macromedia.com
/pub/flashplayer/update/current/sau/11/xml/version.xml
/pub/flashplayer/update/current/sau/11/install/install_all_mac_pl_sgn.z
/pub/flashplayer/update/current/sau/11/install/install_all_mac_pep_sgn.z
/pub/flashplayer/update/current/sau/11/beta/xml/version.xml
/pub/flashplayer/update/current/sau/11/beta/install/install_all_mac_pl_sgn.z
/pub/flashplayer/update/current/sau/11/beta/install/install_all_mac_pep_sgn.z
First, create a plist file with the keys you want to manage.
defaults write my.great.app setting1 -string foobar
defaults write my.great.app setting2 -bool false
defaults read my.great.app
{
setting1 = foobar;
setting2 = 0;
}
mcxToProfile to create a Profile to manage the domain "often".
@poundbangbash
poundbangbash / gist:99ea1f6d837faf4b5cf9
Created May 22, 2015 03:35
ARD AD based authentication
#!/bin/bash
#This script adds local groups to allow for the ard_* group directory based groups to access the computer via ARD
# List of groups to create and edit
groupArray=(ard_interact ard_manage ard_admin)
# List of AD group UUIDs. Get the UUID from the group info in AD.
my_ARD_interact_UUID=AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE
my_ARD_manage_UUID=AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE
my_ARD_admin_UUID=AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE
@poundbangbash
poundbangbash / computernamecode.scpt
Created July 27, 2015 04:08
Computer name code
try
set cpuName to (do shell script "scutil --get ComputerName")
set ipAddress to do shell script "ifconfig $(route get apple.com | awk '/interface/ {print $2}') | awk '/inet / {print $2}'"
set theResult to display dialog "Computer Name:
" & cpuName & "
IP Address:
" & ipAddress buttons {"Copy IP to Clipboard", "Copy Name to Clipboard", "OK"} default button 3
if button returned of theResult is "Copy Name to Clipboard" then
@poundbangbash
poundbangbash / OnDemand example
Created August 20, 2015 13:26
munki OnDemand example 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>OnDemand</key>
<true/>
<key>_metadata</key>
<dict>
<key>created_by</key>
<string>root</string>
<key>PayloadContent</key>
<dict>
<key>com.apple.SetupAssitant</key>
<dict>
<key>Forced</key>
<array>
<dict>
<key>mcx_preference_settings</key>
<dict>
<key>DidSeeCloudSetup</key>
<?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.AppleMultitouchTrackpad</key>
Database located at ~/Library/Group\ Containers/UBF8T346G9.Office/MicrosoftRegistrationDB.reg
- Created on first launch
Table HKEY_CURRENT_USER_VALUES:
node_id 626*
name OpenSaveLocally
type 4
value 1
Table HKEY_CURRENT_USER: