« Dealing with Microsoft Windows People is tiring | Main | MORE Apple Remote Desktop command - line tips »

Some command - line tips for Apple Remote Desktop and OS X

Since I see this question come up regularly on various lists, I thought I'd push this out into the great Google database.

While Apple Remote Desktop is a fantastic GUI management tool, what a lot of people don't know, (because it's somewhat poorly documented) is that Apple Remote Desktop provides you with a couple of spiffy command - line tools, one that is just for Apple Remote Desktop, and one that works even if you don't use Apple Remote Desktop, namely kickstart and systemsetup.


Technorati Tags: , , , , ,

Both of these are part of the Apple Remote Desktop client, so if your systems have the current client, version 2.2, you have them at your disposal. kickstart lives at: /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart and systemsetup lives at: /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/systemsetup . Note that you may have three files: systemsetup, systemsetup-panther and systemsetup-tiger. systemsetup is actually a symlink to one of the other two, depending on the version of your OS as seen here:

ls -l /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/
total 2504
drwxr-xr-x 3 root wheel 102 Feb 21 13:41 ARDForcedViewer.app
-rwxr-xr-x 1 root wheel 46560 Feb 16 11:57 ARDHelper
drwxr-xr-x 3 root wheel 102 Feb 21 13:41 Remote Desktop Message.app
-rwxr-xr-x 1 root wheel 232816 Feb 16 11:54 build_hd_index
lrwxr-xr-x 1 root wheel 18 Feb 24 08:54 networksetup -> networksetup-tiger
-rwxr-xr-x 1 root wheel 189192 Feb 16 12:05 networksetup-panther
-rwxr-xr-x 1 root wheel 191028 Feb 16 12:06 networksetup-tiger
-rwxr-xr-x 1 root wheel 179620 Feb 16 11:55 sysinfocachegen
lrwxr-xr-x 1 root wheel 17 Feb 24 08:54 systemsetup -> systemsetup-tiger
-rwxr-xr-x 1 root wheel 219692 Feb 16 12:05 systemsetup-panther
-rwxr-xr-x 1 root wheel 203688 Feb 16 12:06 systemsetup-tiger

If you have Jaguar clients, you may have another version for that too on those boxes.

kickstart

kickstart is the primary command line interface with the Apple Remote Desktop client, so it isn't a CLI version of the Apple Remote Desktop administration application, but it can still give you some nice abilities. First, obviously, you have to have SSH running, otherwise, connecting to the remote system is going to be a bit hard. Secondly, you'll need to have an account that can use sudo on the remote system, otherwise doing anything with kickstart is effectively impossible. Unless you use sudo, you can't even get a help screen for kickstart, and unfortunately, there's no man page for kickstart, so you have to have sudo access.

You can do four basic operations with kickstart: Uninstall, Install, configure, and (re)start/stop the Apple Remote Desktop client processes.

  1. Uninstall

    The -uninstall option allows you to uninstall at three levels:

    -uninstall -prefs removes the Apple Remote Desktop preferences.
    -uninstall -settings removes the Apple Remote Desktop access privileges that you may have set in System Prefernces or via kickstart.
    -uninstall -files yanks all Apple Remote Desktop - related files.


  2. Install

    -install has one option, -install -package path <path to installer package>. You can also do this via the installer command at /usr/sbin/installer, and installer gives you more options.


  3. Configure

    Since the configure options are how you set up the Apple Remote Desktop client, there's a few of them. I'm not going to detail them all, you can easily read the kickstart help page for that. But, you can:

    Create Apple Remote Desktop users via -configure -users
    Set the Apple Remote Desktop client to run at startup via -configure -activate, or disable this via -configure -deactivate.
    Set the priviledges for a user via -configure -users <shortusername> -privs -<privilege>
    Grant/Deny a user Apple Remote Desktop access via -configure -access -on/-off -users <shortusername>
    Set the computer info fields via -configure -computerinfo -set1/2/3/4 -1/2/3/4 <text>
    Set various client options via -configure -clientopts -<options>


  4. (Re)start/stop

    Stop Apple Remote Desktop via -stop
    Restart Apple Remote Desktop components via -restart -agent/-console/-menu (Restart is a very handy way to get a wonky client to behave)

Again, this is not a complete list of what kickstart can do, but it should help give you an idea of what it can do.

systemsetup

systemsetup is one that used to only work on Mac OS X Server, until someone realized that if Apple Remote Desktop could use it, there was a lot it could do without reinventing the wheel. systemsetup is really a command line way of setting a rather large chunk of what you can set in System Preferences. With systemsetup, you can:

So while systemsetup doesn't handle everything in System Preferences, it gives you an easier way to set a bunch of them via SSH, which definitely does not suck.

Hopefully, once this gets picked up by Google, it will help some folks out with dealing with Apple Remote Desktop from the command line, and reduce the number of n00b questions on this by a few.

Posted by John C. Welch at 22:38 | Permalink


Comments

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?


digital.forest Where Internet solutions grow

 
Family
The Artwork of Melissa Findley
Diane Francis @ the National Post Eric Francis @ the Calgary Sun
Apple Amazon Links
Apple Mac OS X Server 10.5 [Unlimited]

Apple Mac OS X Server 10.5 [10-Client]

Apple Mac OS X 10.5 Leopard

Apple Mac OS X 10.5 Leopard [5-User Family Pack]

Amazon Book Links
Legacy of Ashes: The History of the CIA

The Donnas: Bitchin'

Wizards at War (The Young Wizards, Book 8)

The Demon's Sermon on the Martial Arts

The Collected Stories of Arthur C. Clarke

JavaScript and Ajax for the Web, Sixth Edition

Awakening Warrior: Revolution in the Ethics of Warfare

FOB Links

Mac Web Writers

Techie Links

Review Victims