Create a keytab file for automated access to DartFS
A keytab file can contain the encrypted password for a user in Dartmouth’s Active Directory (i.e. a NetID). Thus a keytab can be used for automated processes which need access to services like DartFS without requiring that the password be stored somewhere in plain text.
Important: It is almost never a good idea to create a keytab file for your real NetID because if anyone else read it then they would have access to everything that your NetID does: email, canvas, DartFS storage, etc. By obtaining a “service account”, and creating a keytab for that, you can restrict the keytab’s access to only what it really needs. Request a service account at https://services.dartmouth.edu/TDClient/1806/Portal/Requests/ServiceDet?ID=30581
Use the ktutil
tool in Linux to create a keytab file (we have not figured out how to make this work on Mac/Windows). You will need to know the following four things to proceed.
The Research Computing Linux systems named Polaris, Andes and Discovery have everything you need. You likely already have an account on them and can login to any one of them with your personal NetID and password (not the service account) to get started. If not, you can request access at https://rcweb.dartmouth.edu/accounts/
$ kinit -c temp\_ticket\_cache _serviceaccount\_netid_
$ kvno -c temp\_ticket\_cache krbtgt/KIEWIT.DARTMOUTH.EDU@KIEWIT.DARTMOUTH.EDU
krbtgt/KIEWIT.DARTMOUTH.EDU@KIEWIT.DARTMOUTH.EDU: kvno = 3
$ rm temp\_ticket\_cache
$ ktutil
`ktutil: add_entry -password -p _serviceaccount_netid_@KIEWIT.DARTMOUTH.EDU -e aes256-cts-hmac-sha1-96 _-k 3_`
(enter password at the prompt)
ktutil: write\_kt ./mykey
ktutil: quit
Note: ktutil does not check that the password is correct. If you typed it wrong (or later change the password) this keytab file won’t work. As long as you know the password, you can always create a new keytab file. An easy way to validate the keytab file is to create a ticket cache using it. You will get an error if the pasword is wrong.
$ kinit -c temp\_ticket\_cache -k -t mykey _serviceaccount\_netid_@KIEWIT.DARTMOUTH.EDU
(no output here is good)
$ rm temp\_ticket\_cache