sudo serveradmin settings info:enableARD = yesOnce run, open System Preferences and click on Sharing. The Remote Management box is then checked and the local administrative user has access to ARD into the host. There are also a few other commands that can be used to control settings. To enable SSH for administrators:
sudo serveradmin settings info:enableSSH = yesWhen you enable SSH from the serveradmin command you will not see any additional checkboxes in the Sharing System Preferences; however, you will see the box checked in the Server app. To enable SNMP:
sudo serveradmin settings info:enableSNMP = yesOnce SNMP is enabled, use the /usr/bin/snmpconf interactive command line environment to configure SNMP so you can manage traps and other objects necessary. Note: You can’t have snmpd running while you configure SNMPv3. Once SNMPv3 is configured snmpd can be run. To allow other computers to use the Server app to connect to the server, use the info:enableRemoteAdministration key from serveradmin:
sudo serveradmin settings info:enableRemoteAdministration = yesTo enable the dedication of resources to Server apps (aka Server Performance Mode):
sudo serveradmin settings info:enableServerPerformanceMode = yes
krypted September 22nd, 2015
echo -n enabled > /Library/Preferences/com.apple.ScreenSharing.launchdI still prefer kickstart, but this method functions when you need something quick and easy. To then disable Screen Sharing, you can just toss the launchd item:
rm /Library/Preferences/com.apple.ScreenSharing.launchdOnce you have Screen Sharing started, you can then open the Screen Sharing application from a client by using the open command, followed by the protocol, which would be vnc and then the IP address. As with FTP you can also inject the user name and password into the open, following the //, by placing the user name followed by a colon (:) followed by the password and then the @ symbol (all before the IP address). For example, to connect to a computer with an IP address of 192.168.200.2 using the username of krypted and the password of mypass you would use the following command.
open vnc://krypted:firstname.lastname@example.orgYou may encounter an encryption error, which if you are attempting to script can be annoying to click on. To suppress it, use defaults to set the dontWarnOnVNCEncryption key of the com.apple.ScreenSharing.plist to True:
defaults write com.apple.ScreenSharing dontWarnOnVNCEncryption -bool TRUEHave fun!
krypted January 26th, 2010
./kickstart -configure -access -on -privs -all -users -xsanadminYou can also enable access to Open Directory accounts if your Xsan includes those. In the following we’ll configure Remote Management to allow Open Directory logins (-setdirlogins yes and then enable the specific groups that will have access (-setdirgroups -dirgroups) to the Open Directory group called xsanadmins:
./kickstart -configure -clientopts -setdirlogins yes -setdirgroups -dirgroups xsanadminsYou can also configure each of the check boxes for each permission independently, using -DeleteFiles, -ControlObserve, -TextMessages, -ShowObserve, -OpenQuitApps, -GenerateReports, -RestartShutDown, -SendFiles, -ChangeSettings and -ObserveOnly. The global options for the Remote Desktop client can also be set. To do so you would add the -clientopts option and specify which of the features to configure. Other than the Directory Services options, these include those settings accessible through the Computer Settings… button. Show Remote Management status in menu bar can be enabled using -setmenuextra yes. Anyone may request permission to control screen can be enabled using -setreqperm yes. VNC viewers may control screen with password can be enabled using -vnclegacy yes. You can also set the password using -vncpw followed by the password you would like to use. You can also set the Computer Information fields using -computerinfo followed by -set1, -set2, -set3 and -set4. But kickstart isn’t just for setting up the ARD client. You can also restart Remote Management when you are having problems by running the -restart option when SSH’d into a host:
./kickstart -restart -agent -consoleAnd what the Xsan admin giveth the Xsan admin can taketh away; you can disable Remote Management access by setting -access to off:
./kickstart -configure -access -offYou can also use kickstart to install and uninstall packages, but in my experience you’re gonna’ want to use the Remote Desktop software to do that. For more on the options available in kickstart, check out:
./kickstart -helpFinally, if you would rather perform a file drop to deploy settings (or use the defaults/plutil commands to deploy settings) then you’ll need to know the property lists, or domains that the preference files are stored in. Because kickstart is not compiled you can find these in the variable definitions at the beginning of the script.
krypted August 27th, 2009
krypted January 7th, 2008
defaults write /Library/Preferences/com.apple.RemoteDesktop AdminConsoleAllowsRemoteControl -bool falseAnd then run the kickstart -restart -agent command from /System/Library/CoreServices/ARD Agent.app/Contents/Resources
/System/Library/CoreServices/ARD Agent.app/Contents/Resources/kickstart’ -restart -agent
krypted October 2nd, 2006