8f42d430 |
1 | #!/bin/bash |
cf08a29f |
2 | # Get an AFS token for the given user. |
3 | # |
4 | # This is used to deliver mail with the appropriate credentials. |
5 | |
5092a970 |
6 | touch /tmp/get-token-was-called |
7 | |
8 | exec 2>&1 |
9 | exec >& /tmp/get-token-log |
10 | |
11 | echo ============================================================================== |
12 | echo invoked: get-token $@ |
13 | echo userid: `who am i` |
14 | |
8f42d430 |
15 | USER=$1 |
16 | export KRB5CCNAME=FILE:/tmp/krb5cc_$USER.email |
17 | kdestroy |
18 | unlog |
cf08a29f |
19 | |
5092a970 |
20 | KEYTAB=/etc/keytabs/email/$USER.email.keytab |
21 | echo kinit -kt $KEYTAB $USER/mailfilter@HCOOP.NET |
22 | kinit -kt $KEYTAB $USER/mailfilter@HCOOP.NET |
23 | aklog |
24 | tokens |
25 | echo .............................................................................. |
26 | |