Skip to content

Instantly share code, notes, and snippets.

@benbasscom
Created March 4, 2015 11:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benbasscom/b39f59f760669229bd7e to your computer and use it in GitHub Desktop.
Save benbasscom/b39f59f760669229bd7e to your computer and use it in GitHub Desktop.
No-pkg for munki that enables VNC, ARD and SSH
<?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>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>production</string>
</array>
<key>display_name</key>
<string>Remote Management Activation</string>
<key>installer_type</key>
<string>nopkg</string>
<key>installs</key>
<array>
<dict>
<key>path</key>
<string>/usr/local/munki/.remotemanagement2</string>
<key>type</key>
<string>file</string>
</dict>
</array>
<key>preinstall_script</key>
<string>#!/bin/bash
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -allowAccessFor -specifiedUsers -configure -users localadmin -access -on -privs -all -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw VNC-PW
sleep 2
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -users localadmin -privs -all
sleep 2
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -menu -clientopts -setmenuextra -menuextra no
sleep 2
# create ssh access group, add local admin group and IT's AD-GROUP to allow access
echo "Enabling ssh for admins"
systemsetup -setremotelogin on
dseditgroup -o create -q com.apple.access_ssh
dseditgroup -o edit -a admin -t group com.apple.access_ssh
dseditgroup -o edit -a AD-GROUP -t group com.apple.access_ssh
exit 0
</string>
<key>postinstall_script</key>
<string>#!/bin/sh
touch /usr/local/munki/.remotemanagement2
exit 0
</string>
<key>minimum_os_version</key>
<string>10.7.5</string>
<key>name</key>
<string>Remote Management Activation</string>
<key>uninstallable</key>
<false/>
<key>version</key>
<string>1.1</string>
<key>unattended_install</key>
<true/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment