HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

Error: Kerberos error: Unknown code krb5 195 (try running kinit)


We migrated to Exchange 2007 and since the move, we are unable to have helpspot connect to the mailbox, getting “Error: Kerberos error: Unknown code krb5 195 (try running kinit)”. We can access it fine via OWA.

Any assistance anyone can provide would be greatly appreciated


I had this same error, HelpSpot running on a linux server (ubuntu 7.10). I tried for weeks to resolve this and could not get it to scrape. Under the IMAP4 service I turned on “Plain text logon (Basic Auth), No TLS” Still errored out. I believe Exchange 2007 advertises GSSAPI (Kerberos authentication), php-imap only tries to connect using GSSAPI authentication (and fails) and doesn’t then try to use plain authentication. In the end, due to this and Exchange 07 being a resource hungry app, I migrated back to Exchange03.



I managed to get it to work by setting up Kerberos and getting a ticket. Here’s what I did:

  1. Edit the krb5.conf file to match your domain environment
  2. Create a script to check the mail that creates the ticket if it does not exist already then checks the mail:

/usr/kerberos/bin/klist -c /var/tmp/apache | grep -q krbtgt || echo | /usr/kerberos/bin/kinit -c /var/tmp/apache

export KRB5CCNAME=/var/tmp/apache

/usr/bin/php /var/www/html/helpspot/tasks.php

  1. Add another crontab entry that renews the kerberos ticket every hour:

/usr/kerberos/bin/kinit -R -c /var/tmp/apache

I’m sure that this can be tweaked and improved, but it seems to be working just fine for us. I also passed this info on to Ian.


Thank you so much for the steps! I might give Exchange07 another shot after all!


Thanks again for this information Hugh. I’m going to try and get a page up in the docs with it asap and then research some more to see if there’s anyway HS can help facilitate this further.