1.0

Table Of Contents
www.vmware.com
250
VMware ACE Administrator’s Manual
Sample Scripts
Sample Authentication Script
The following sample script is written in C. It is installed by VMware ACE Manager as
sampleAuth.c. You may compile it with a C compiler if you want to run it.
/*
*
* VMware Sample Script
*
*
* This is a sample authentication script for VMware ACE.
*
*
* Input to script:
* None
*
* Returns:
* Exit code of 0 if successful (user is correctly authenticated)
* Exit code nonzero if an error occurred, or if authentication
* failed
*
* Expected output:
* Seed data to hash to create key for encryption/authentication
* subsystem on stdout.
*
*
* Notes:
* If the script returns success, its output will be hashed to
* create a key. Therefore it is important that the output of
* this script is unique for each user, and that there is enough
* data to make a meaningful key. (That is, at least 16 bytes.)
*
*
* Notes about this sample:
* This script contains key data (hard-coded) for several users.
* The script assumes that the username is contained in an
* environment variable called TEST_USERNAME (a fictitious
* environment variable used in this sample).
*
* It will then return the correct data for that user if one
* exists; otherwise it will return an error exit code (1).
*
*
*/