Home All Groups Group Topic Archive Search About

How to delete Kerberos tickets

Author
27 Apr 2009 7:52 PM
Frank Perry
Howdy,

I have an app that requests data from a server.  I am using Kerberos tickets
for authentication.  My problem is that users of remote machines don't log
off those machines and after a number of days, the ticket granting ticket
reaches the end of its renewal period.  Under Windows XP sp2 (can't go to sp3
yet), my calls to get a new ticket fail.  If I can delete the ticket with
klist.exe, the program will get a new ticket and the user is authenticated. 

I am trying to get the function CredDelete to remove the Kerberos ticket so
I can request a new one, but all the calls return that they can't find the
ticket (error 1168).  The code looks like

    LPCWSTR pwstrPrincipal = (LPCWSTR) "krbtgt/myPlace";
    BOOL bCredBack = ::CredDeleteW(pwstrPrincipal,(DWORD) 1,(DWORD)0);

Any ideas what I'm doing wrong?
--
Frank Perry
LavaLeaf Software

Author
27 Apr 2009 9:15 PM
Douglas J. Steele
Sorry, but this newsgroup is for questions about security in Access, the
database product that's part of Office Professional.

You'd be best off reposting your question to a newsgroup related to Windows.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


Show quoteHide quote
"Frank Perry" <FrankPe***@discussions.microsoft.com> wrote in message
news:3EF5C1E2-3937-4DEB-81B4-7F197937C50B@microsoft.com...
> Howdy,
>
> I have an app that requests data from a server.  I am using Kerberos
> tickets
> for authentication.  My problem is that users of remote machines don't log
> off those machines and after a number of days, the ticket granting ticket
> reaches the end of its renewal period.  Under Windows XP sp2 (can't go to
> sp3
> yet), my calls to get a new ticket fail.  If I can delete the ticket with
> klist.exe, the program will get a new ticket and the user is
> authenticated.
>
> I am trying to get the function CredDelete to remove the Kerberos ticket
> so
> I can request a new one, but all the calls return that they can't find the
> ticket (error 1168).  The code looks like
>
> LPCWSTR pwstrPrincipal = (LPCWSTR) "krbtgt/myPlace";
> BOOL bCredBack = ::CredDeleteW(pwstrPrincipal,(DWORD) 1,(DWORD)0);
>
> Any ideas what I'm doing wrong?
> --
> Frank Perry
> LavaLeaf Software