Using the demonstration scripts

This chapter describes the ADEdit sample scripts provided in the package. The scripts are listed in the following table. The corresponding source files are in the /usr/share/centrifydc/samples/adedit directory. The source file name is shown in the table and each script header.

You have a couple of different ways to invoke scripts from the command line (see Creating ADEdit scripts). The sample scripts demonstrate two of them.

Section heading Purpose Source file name

Reading command line input

These scripts illustrate two different methods for using the Tcl argv, argc, and argv0 variables.

MktDept.sh

getopt-example

Create a parent zone

This script illustrates how to create a Centrify parent zone.

CreateParentZone

Create child zones

This script illustrates how to create two child zones in a parent zone.

CreateChildZones

Create privileged commands and roles

These scripts illustrate how to create new privileged commands and new roles that include those commands.

MakeRole

ApacheAdminRole

Add and provision UNIX users

This script and input file illustrate how to add users to Active Directory and copy them to the Active Directory UNIX Users group.

If you have the Zone Provision Agent configured and running, you can use this script or one similar to it to automatically provision user profiles when users are added to Active Directory.

AddUnixUsers

users.txt

Simple tools

These scripts demonstrate how you can list the computers in a zone, extract field attributes from user objects, and list the users in a zone.

computers-report

useracc-report

user-report

GetComputers

Run a script from a script

These scripts illustrate how you can call a script (setenv) from within another script to perform different queries based on the values entered.

setenv

GetChildZones

GetGroups

GetUsers

GetZones