OSF DCE Administration Guide--Core Components

Writing Scripts and dcecp Objects
.
{-uid integer uid
"User Identifier of the principal to be added."}}
#
# Initializing some variables.
#
upvar 1 local_args cargs
set local_args $cargs
set account_args ""
set princ_args ""
set group_args ""
set force 0
parseargs $arg_table local_args -no_leftovers
if { [info local help_prose]>0}{return }
if { [llength $local_args]>1}{
error "Unrecognized argument [lindex $local_args 1]."
} elseif { [llength $local_args] ==0}{error "No user name."
} else { set account_name $local_args }
#
# If parseargs returned attributes in a list instead of options,
# create an attribute list. Then call process_attribute_list to
# parse the list.
#
if { [info local attribute_list] > 0} {
set pile_of_attributes "alias client descr dupkey expdate\
forwadabletkt fullname force group home organization maxtktlife \
maxtktrenew mypwd password postdatedtkt proxiabletkt pwdvalid \
renewabletkt server quota shell stdgtauth"
process_attribute_list attribute_list $pile_of_attributes
}
#
# If user entered attributes as options rather than in a list,
# check for attribute options.
#
if { [info local group] > 0} {
set account_args [format "%s {%s %s}" $account_args group $group]
} else { error "No group name specified." }
if { [info local organization] > 0} {
set account_args [format "%s {%s %s}" $account_args organiz \
$organization]
} else { error "No organization name specified." }
if { [info local password] > 0} {
set account_args [format "%s {%s %s}" $account_args password \
$password]
} else { error "No password specified." }
if { [info local mypwd]>0}{
set account_args [format "%s {%s %s}" $account_args mypwd $mypwd]
124243 Tandem Computers Incorporated 37