Add -r to kadmin commands.
Fix so the script can be called from a host that does not use STACKEN.KTH.SE as the default realm.
This commit is contained in:
parent
eba4074699
commit
31c78a356e
1 changed files with 2 additions and 2 deletions
|
@ -44,11 +44,11 @@ log "Query finger.json for $1"
|
||||||
"add it and run this script again."
|
"add it and run this script again."
|
||||||
|
|
||||||
log "Check for $1 in KDC"
|
log "Check for $1 in KDC"
|
||||||
if echo get $1 | kadmin | grep -q "$1@STACKEN.KTH.SE"; then
|
if echo get $1 | kadmin -r STACKEN.KTH.SE | grep -q "$1@STACKEN.KTH.SE"; then
|
||||||
log "Principal $1 exists in KDC, ignore"
|
log "Principal $1 exists in KDC, ignore"
|
||||||
else
|
else
|
||||||
log "Add $1 to KDC"
|
log "Add $1 to KDC"
|
||||||
kadmin add \
|
kadmin -r STACKEN.KTH.SE add \
|
||||||
--max-ticket-life="10 hours" \
|
--max-ticket-life="10 hours" \
|
||||||
--max-renewable-life=unlimited \
|
--max-renewable-life=unlimited \
|
||||||
--expiration-time="$(date +%Y --date="2 years")-03-15" \
|
--expiration-time="$(date +%Y --date="2 years")-03-15" \
|
||||||
|
|
Loading…
Add table
Reference in a new issue