15 lines
315 B
Python
15 lines
315 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
from base64 import b64encode
|
||
|
import sys
|
||
|
|
||
|
from ceo_common.krb5.utils import get_fwd_tgt
|
||
|
|
||
|
if len(sys.argv) != 2:
|
||
|
print(f'Usage: {sys.argv[0]} <ceod hostname>', file=sys.stderr)
|
||
|
sys.exit(1)
|
||
|
|
||
|
b = get_fwd_tgt('ceod/' + sys.argv[1])
|
||
|
with open('cred', 'wb') as f:
|
||
|
f.write(b64encode(b))
|