Standardize License information
[openafs.git] / src / kauth / test / test_kaserver
1 #!/bin/csh -f -e
2 # Copyright 2000, International Business Machines Corporation and others.
3 # All Rights Reserved.
4
5 # This software has been released under the terms of the IBM Public
6 # License.  For details, see the LICENSE file in the top-level source
7 # directory or online at http://www.openafs.org/dl/license10.html
8
9 set db=/tmp/db
10 set host=`hostname`
11
12 if (! -d $db) then
13   mkdir $db
14 else
15   set nonomatch
16   rm -f $db/kaserver*
17   unset nonomatch
18 endif
19
20
21 rm -f /tmp/pid
22 background kaserver -cellservdb /usr/vice/etc -servers $host -database $db/kaserver -noauth >/tmp/pid
23 alias kasu './kas \!* -admin_username $user -password $user -servers $host'
24 kasu cr $user $user
25 kasu sf $user +admin
26 kasu cr afs afs
27 kasu ex $user
28 kasu sp AuthServer.Admin authserv
29
30 sleep 1
31 kill `cat /tmp/pid`
32 echo killing off kaserver
33 echo restarting w/o NoAuth
34 background kaserver -cellservdb /usr/vice/etc -servers $host -database $db/kaserver -fastkeys>/tmp/pid
35
36 rm -f /tmp/foo
37 echo '#! /bin/csh -f' >/tmp/foo
38 echo '/usr/andy/bin/tokens>/dev/null' >>/tmp/foo
39 #echo '/usr/andy/bin/unlog' >> /tmp/foo
40 echo "./klog $user $user -servers $host">>/tmp/foo
41 echo '/usr/andy/bin/tokens' >>/tmp/foo
42 echo 'exit 0'>>/tmp/foo
43 chmod +x /tmp/foo
44
45 ./test_badtix /tmp/foo
46
47 kasu cr a b
48 ./kpasswd -x a b zzzsab -servers $host
49 ./kpasswd -x a zzzsab wxyzzy -servers $host
50 kasu cr b c
51 kasu cr c d
52 kasu delete a
53 kasu delete b
54 kasu delete c
55 kasu cr sample.holmes foo
56 kasu setkey sample.holmes -kvno 17 -new_key '\362\367\316\326\370\304\3738'
57 kasu cr kazam kazam
58 kasu sf kazam +admin
59 kasu cr smn smn
60 kasu sf smn +admin
61 kasu cr dousti dousti
62 kasu sf dousti +admin
63 kasu sf dousti noadmin
64 kasu sf dousti +admin
65 kasu sf kazam -exp 2/20/2020
66 kasu sf kazam -exp never
67 kasu ex afs
68 kasu ls
69
70 sleep 1
71 kill `cat /tmp/pid`
72 echo killing off kaserver