Skip past navigation linksSecure Global Desktop 4.40 Administration Guide > Organizing Your Resources > Populating the SGD Organizational Hierarchy Using a Batch Script

Populating the SGD Organizational Hierarchy Using a Batch Script


You want to populate your organizational hierarchy.


Use the batch scripting functionality of the tarantella object command to create objects within the organizational hierarchy.


Case Study

Indigo Insurance needs to create the organizational units (OUs), applications, application servers, and users to reflect the structure of the organization. You want to automate this process.


  1. Design the structure of your SGD organizational hierarchy, reflecting the structure of Indigo Insurance. Think carefully about how you can use inheritance to make management more easy.
  2. Create a file for each type of object you are using in your organizational hierarchy. Each file contains one line per object, with the correct syntax for creating the object from the appropriate tarantella object new_object_type command. For example, to create five OUs you might have a file orgunits.txt containing the following:
    Skip past command syntax or program code--name "o=Indigo Insurance/ou=IT"
    --name "o=Indigo Insurance/ou=Sales" \
    --name "o=Indigo Insurance/ou=Marketing" \
    --name "o=Indigo Insurance/ou=Finance" \
    --name "o=Indigo Insurance/ou=Finance/ou=Administration" 

    Do not include the command name (for example, object new_windowsapp) as part of each line.

    Application objects (including groups and OUs) must be created in the o=applications organization.

    Application server objects (including groups and OUs) must be created in the o=appservers organization.

  3. Once all your files are complete, use the tarantella object script command to process them all at once, for example:
    Skip past command syntax or program code#!/bin/sh
    tarantella object script << EOF
    new_orgunit --file orgunits.txt
    new_group --file groups.txt
    new_host --file hosts.txt
    new_person --file people.txt
    new_xapp --file xapps.txt
    new_windowsapp --file windowsapps.txt
    new_charapp --file charapps.txt

    The tarantella object script command runs each command in order. Each command reads and processes the specified file.

Next Steps

Related Topics