OSF DCE Administration Guide--Core Components

OSF DCE Administration Guide—Core Components
script.
Next it initializes variables entered either as options or as attributes in a list. A
process_attribute_list procedure (at the end of the example) actually parses attributes
that have been passed as a list. Then it does the work of creating the user information in
the registry and in CDS. Near the end, the cleanup procedure
_dcp_cleanup_user_create can undo a failed user create operation.
.
. [several low-level procedures omitted]
.
#
# This procedure creates a principal in the current registry _s(sec)
# if that principal does not yet exist.
#
proc _dcp_create_principal_entry { principal_name princ_args} {
set list_of_principals [principal catalog]
if { [lsearch $list_of_principals $principal_name] == -1} {
if { [llength $princ_args ] !=0}{
principal create $principal_name -attribute $princ_args
} else
} else {
error "Principal \"$principal_name\" already exists."
}
}
#
# proc _dcp_create_user - This procedure actually creates a DCE user.
# Several steps are performed. If the principal does not exist
# a new one is created. If the groups do not exist and a -force switch is
# set, then two new groups will be added. The user will be added to the
# groups. The account will then be created. An entry in the CDS
# namespace will then be created with the appropriate ACL’s.
#
proc _dcp_create_user { local_args } {
set arg_table {
{-alias string alias
"Add principal named as an alias of specified uid."}
{-attribute string attribute_list
"Provide attributes in an attribute list format."}
{-client string client
"Can the account principal be a client."}
{-description string descr
"A general description of the account."}
{-dupkey string dupkey
"Can the accounts’s principal have duplicate keys."}
{-expdate string expdate
"When does the account expire."}
.
. [repetitive elements omitted]
3 6 Tandem Computers Incorporated 124243