Check Exit Status Code for Kerberos Ticket Validity

If you’re familiar with Kerberos, one way to check if a ticket is valid is to run klist command. ❯ klist Ticket cache: FILE:/tmp/krb5cc_1001 Default principal: username@UNIVERSITY.EDU.AU Valid starting Expires Service principal 02/07/21 11:26:50 02/07/21 21:26:50 krbtgt/UNIVERSITY.EDU.AU@UNIVERSITY.EDU.AU renew until 03/07/21 11:26:50 02/07/21 12:24:07 02/07/21 21:26:50 cifs/server1.UNIVERSITY.edu.au@UNIVERSITY.EDU.AU 02/07/21 12:24:07 02/07/21 21:26:50 cifs/server1.UNIVERSITY.edu.au@UNIVERSITY.EDU.AU ❯ date Mon 05 Jul 2021 16:01:59 AEST From the above output, the principal ticket expired since 2 Jul. So how do we find out if the Kerberos (principal) ticket expires programmatically?...

July 5, 2021 · 2 min · 284 words · kenno

How to change shell in Fedora

If your search engine take you to this page, chances are you get used to use chsh to change user’s shell. On Fedora (28 at least), chsh is not available by default. You can install util-linux-user according to this post to get the chsh command. However, there is another alternative which I didn’t even think of - use usermod command. Here’s how I did it to change to zsh shell:...

July 23, 2018 · 1 min · 91 words · kenno