Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.
Endpoint Management Community Blog

Altiris Client for Mac and Apple Remote Desktop

Created: 06 Feb 2008 • Updated: 07 May 2008 • 5 comments
kbuller's picture
0 0 Votes
Login to vote

I did a search for "Macintosh" on the Juice site the other day and came up with 4 results... Hopefully this article will be of interest to at least a few people.

The latest release of the Deployment Console supports Macintosh clients but in its current state it is no match for Apple Remote Desktop. I just wanted to share a couple scripts that I use from ARD to make the most out of the Altiris Client for Mac.

Click the "Unix" button on the toolbar of ARD and place these scripts in it.

Refresh Altiris Client Policies

/Applications/Utilities/Altiris/NSAgent/.bin/aex-refreshpolicies

Send Basic Inventory

/Applications/Utilities/Altiris/NSAgent/.bin/aex-sendbasicinv

Run Inventory

Replace -x on the last line with -r for Full, -h for Hardware, and -s for Software

#! /bin/sh -c
cd "/Applications/Utilities/Altiris/NSAgent/.var/packages/{DEC68AD9-46F6-4139-9793-AE0E1B050BFC}"
./aex-runinvnow -x

This script doesn't use the Altiris Client but I thought it might be of use to some of you. It checks the dock for every user on the machine for an Application. Right now it will find any application that has "Adobe" in it's name. I used this during an upgrade from CS2 to CS3 to gage who was actually using their CS2 apps and which ones.

Check for an App in the Dock:

for lName in `ls -A /Users`; do
  for uName in `dscl . -list /Users`; do
  if [ $uName = $lName ]; then (echo $uName; defaults read /Users/$uName/Library/Preferences/com.apple.dock | grep Adobe | grep .app); fi
  done
done

Now it's time for the Altiris Client to return the favor to Apple Remote Desktop. What will be accomplished here is that the Altiris client will create an admin user on the local machine and then will set the Apple Remote Desktop client to be active and turned on for that admin user (the admin user will be created in such a way that users will never see the account or be able to login as that user).

In the Altiris Console, create a Macintosh Package that contains no source files and then add a program with the parameters below and then create a task that runs at login. What this script does is ping the ip of your NS, if the ping is successful, then it downloads a file, executes it, then deletes it.

Working Directory

/var/tmp

Command Line

if [ `ping -t 4 -n -c 4 -i 1 -q -o IP-ADDRESS-OF-NS | grep -c 1\ packets\ received` -eq 1 ]; then (curl -O http://NS-SERVER-NAME/Altiris/NS/NSCap/Bin/Mac/SWD/LoginScript/Login.sh; chmod +x Login.sh; ./Login.sh; rm -f Login.sh ); else (echo The script will not run); fi;

The path /NSCap/Bin/Mac/SWD/LoginScript/ doesn't exist, you'll have to create it and then place the script below in that directory.

Note: This script isn't exactly secure, it creates an admin user that has a password the same as it's username.
#!/bin/sh
#**************************************************************************************************
# Create ARD Admin User if one does not exist. Then make sure ARD is on and permissions are enabled for that user
#
ARD=NameOfYourAdminUser
if [ "`dscl . -list /Users | grep -c $ARD`" -eq "0" ]
  then  (
    dscl . -create /Users/$ARD
    dscl . -create /Users/$ARD UserShell "/usr/bin/false"
    dscl . -create /Users/$ARD UniqueID 400
    dscl . -create /Users/$ARD PrimaryGroupID 80
    if [ -e /private/var/$ARD ]; then (echo dir exists); else (mkdir /private/var/$ARD; chown $ARD /private/var/$ARD); fi
    dscl . -create /Users/$ARD NFSHomeDirectory /private/var/$ARD
    dscl . -passwd /Users/$ARD $ARD
    )
fi
#
# Turn on ARD and set permissions for the $ARD user
#
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users $ARD -privs -DeleteFiles -ControlObserve -TextMessages -OpenQuitApps -GenerateReports -RestartShutDown -SendFiles -ChangeSettings -restart -agent

Comments 5 CommentsJump to latest comment

DJLee's picture

Thanks for posting this info!

+3
Login to vote
ShawnA's picture

Thanks for sharing this information. Keep on posting articles like these. Keep it up! By the way, have you heard the latest on Apple? Oh boy – another Apple announcement or "media event" for stuff we can buy that, if iTunes is any kind of reference point, will work slowly if at all, and people will pay a lot of money for it because they're that unfulfilled as people.  At any rate, the Apple announcement is that they're unveiling a few things.  There's Apple iTunes 9, and iTunes LP – which will include visual aids like liner notes for downloaded music.  Steve Jobs was there, and he also announced updates to the Apple Store, which will tell you what applications to get.  There's new iPods and other products to get, too, and each Apple announcement leads to people getting payday cash to buy more stuff.

-1
Login to vote
rufusl's picture

 On 10.4 machines it used to be possible to run this command from apple remote desktop

#! /bin/sh -c
cd "/Applications/Utilities/Altiris/NSAgent/.var/packages/{DEC68AD9-46F6-4139-9793-AE0E1B050BFC}"
./aex-runinvnow -s
This would tell the machine to run a software inventory. But now on 10.5.8 this is the following error

SoftWareScan[27654:10b] CFPropertyListCreateFromXMLData(): Old-style plist parse: missing semicolon in dictionary

Anyone have any ideas how to fix this?

-1
Login to vote
rufusl's picture

 On 10.4 machines it used to be possible to run this command from apple remote desktop

#! /bin/sh -c
cd "/Applications/Utilities/Altiris/NSAgent/.var/packages/{DEC68AD9-46F6-4139-9793-AE0E1B050BFC}"
./aex-runinvnow -s
This would tell the machine to run a software inventory. But now on 10.5.8 this is the following error

SoftWareScan[27654:10b] CFPropertyListCreateFromXMLData(): Old-style plist parse: missing semicolon in dictionary

Anyone have any ideas how to fix this?

+1
Login to vote
henningsly_connect's picture

This is an extremely helpful post, thanks for sharing this solution. I was having a lot of trouble with this earlier when trying to use my Altiris client. I sometimes use Apple remote desktop client but it can be hard to figure out sometimes. Overall, it really helps with my productivity when I'm away. This really lends a hand to my sanity.

0
Login to vote