$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $! This command file assists in configuring and running the $! MIT test images. You can run it by itself or through $! the respective setup.com files in each MIT sample program subdirectory. $! $! The easiest way to use this command file is to replace "opnnow" $! below with the nodename running your test servers or KDC. $! $! $! Usage: $! $ @setup_principal < KDC > < nodename | CLEAN nodename > $! $! - Using setup with no parameters does nothing. $! - requests that the sample/node principal be set up in the $! local KDC along with its keytab entry. Both are required. $! - removes the keytab and principal from the local KDC. $! - must be specified to operate on the right principal. $! $! $ if (p1 .eqs. "KDC") $ then $ if (p2 .eqs. "CLEAN") $ then $ if (p3 .eqs. "") $ then $ write sys$output "SETUP-F-NoNodeName, A client nodename (P3) is required for the principal." $ exit $ else $ nodeName = F$EDIT(p3,"LOWERCASE") $ endif $ open/write cmd tmp_cmd.com $ write cmd "$ kadmin" $ write cmd "ktrem sample/''nodeName'" $ write cmd "delprinc sample/''nodeName'" $ write cmd "yes" $ write cmd "q" $ close cmd $ @tmp_cmd.com $ delete/nolog/noconfirm tmp_cmd.com; $ else $ if (p2 .eqs. "") $ then $ write sys$output "SETUP-F-NoNodeName, A client nodename (P2) is required for the principal." $ exit $ else $ nodeName = F$EDIT(p2,"LOWERCASE") $ endif $ open/write cmd tmp_cmd.com $ write cmd "$ kadmin" $ write cmd "addprinc -randkey sample/''nodeName'" $ write cmd "ktadd sample/''nodeName'" $ write cmd "q" $ close cmd $ @tmp_cmd.com $ delete/nolog/noconfirm tmp_cmd.com; $ endif $ else $ write sys$output "=========================================================" $ write sys$output "Usage: @setup_principal KDC < nodename | CLEAN nodename >" $ write sys$output "=========================================================" $ endif $ $ if (p1 .nes. "") $ then $ write sys$output "===============================================================================================" $ write sys$output "You may need to kinit your client session if you have replaced a previous sample/node principal." $ write sys$output "===============================================================================================" $ endif $ exit