Home > Mac administration, Scripting > Absolute Manage Custom information items

Absolute Manage Custom information items

I’ve worked with Absolute Manage (formerly LANrev) and one of my favorite things about it was that I could set up custom inventory entries (called Custom Information Items) using scripts. This allowed me to poll my managed machines for specific information and to build Absolute Manage smart groups that used that information to add or remove machines to and from that smart group.

Below the jump, I’ve posted some of the scripts I’ve used in the past to look for encrypted Macs, check which machines had which accounts (based on the presence of a home folder in /Users), and whether or not a Mac has the Mac NetWorker client or the Atempo LiveBackup client installed.

Custom information items

Accounts on Mac

Checks Macs for home folders in /Users, to help identify which accounts are on each Mac.

#!/bin/bash

USERS=$(ls -1 /Users)

for u in $USERS
do
if [[ $u = .* ]]; then
echo > /dev/null
elif [[ "$u" = Deleted* || "$u" = Users* ]]; then
echo > /dev/null
elif [[ "$u" = Temporary* || "$u" = Items* ]]; then
echo > /dev/null
elif [ "$u" = "Shared" ]; then
echo > /dev/null
else
echo $u
fi
done

FileVaulted Accounts

Checks Macs running 10.3.x, 10.4.x, 10.5.x and 10.6.x to see if FileVault has been enabled on any account.

#!/bin/bash

CWD=`pwd`
USERS=$(ls -1 /Users)
OS=`/usr/bin/sw_vers | grep ProductVersion | cut -c 17-20`

for u in $USERS
do
if [ "$u" = "Shared" ]; then
echo > /dev/null
else
dscl . read /users/$u >> $CWD/temp.txt
fi
done

if [ "$OS" = "10.5" ]; then
grep sparsebundle $CWD/temp.txt | cut -d / -f 5
elif [ "$OS" = "10.6" ]; then
grep sparsebundle $CWD/temp.txt | cut -d / -f 5
else
grep sparseimage $CWD/temp.txt | cut -d / -f 5
fi

rm $CWD/temp.txt

Live Backup client installed

Checks Macs to see if they have the Atempo Live Backup client installed

#!/bin/bash

CWD=`pwd`

if [ -d /Applications/LiveBackup.app ]; then
echo "Yes" >> $CWD/lbtemp.txt
else
echo "No" >> $CWD/lbtemp.txt
fi
cat $CWD/lbtemp.txt
rm $CWD/lbtemp.txt

NetWorker client installed

Checks Macs to see if they have the EMC NetWorker client installed

#!/bin/bash

CWD=`pwd`

if [ -d /nsr ]; then
echo "Yes" >> $CWD/nwtemp.txt
else
echo "No" >> $CWD/nwtemp.txt
fi
cat $CWD/nwtemp.txt
rm $CWD/nwtemp.txt

PGP Encrypted Boot Drive

Checks Macs to see if the boot drive has been encrypted with PGP

#!/bin/bash

CWD=`pwd`

if [ -f /PGPWDE01 ]; then
echo "Yes" >> $CWD/pgptemp.txt
else
echo "No" >> $CWD/pgptemp.txt
fi
cat $CWD/pgptemp.txt
rm $CWD/pgptemp.txt

PDF with the scripts showing correct indentation.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: