### greet_dced.install

Following are the contents of the greet_dced.install file, which is the dcecp install script for the greet_dced server.

set dir /users/your_user_name/src/dce/greet_dced/greet_dced

set cds_dir /.:/subsys/my_company/greet_dced

# Unix and group id of the server process owner

# has to own the keytab file as well

set uid 1265

set gid 1000

# add a PGO for the server

set cmd "user create greet_dced_server -group servers \

-o osf -password secret -mypwd -dce-"

if {[catch $cmd msg] != 0} {

echo "user create:" $msg

}

# create a directory in CDS and give access to the server

# this will fail if any directory in the chain is not already there

set cmd "directory create $cds_dir"

if {[catch $cmd msg] != 0} {

echo "directory create: " $msg

}

set cmd "acl modify $cds_dir -add {user greet_dced_server rwdit}"

if {[catch $cmd msg] != 0} {

echo "acl modify: " $msg

}

# create a keytab for the server

set cmd "keytab create greet_dced.ktab \

-storage $dir/greet_dced.ktab \

-data {greet_dced_server plain 1 secret}"

if {[catch $cmd msg] != 0} {

echo "keytab create: " $msg

}

# dced create the keytab file with root as its owner

# so we have to chown it, but

# this may require root permission, so it's likely to fail.

set cmd "exec chown $uid $dir/greet_dced.ktab"

if {[catch $cmd msg] != 0} {

echo "chown: " $msg

}

# create the srvrconf object

set cmd "server create greeter_dced \

-program $dir/greet_dced_server \

-entryname $cds_dir/greeter_dced_entry \

-keytabs [attrlist getvalues [keytab show greet_dced.ktab] \

-type uuid]\

-principals {greet_dced_server} \

-starton explicit \

-directory $dir/exec_dir \

-services { {ifname greet_dced} \

{interface {3d6ead56-06e3-11ca-8dd1-826901beabcd 1.0}}} \

-uid $uid -gid $gid"

if {[catch $cmd msg] != 0} {

echo "server create: " $msg

}

###