We help IT Professionals succeed at work.

Has anyone ever successfully used the command "klist purge" on vista?

McKnife
McKnife used Ask the Experts™
on
Hi experts!

I am familiar with the kerberos command line tool klist.exe. I have used it succesfully on windows 7 and server 2003 and server 2008 ("R1"). On Vista however, the command "klist purge" returns
klist purge
Error loading resource: 0x00003b01
Error loading resource: 0x00003b01
Error loading resource: 0x00003b01

It does that on all vista systems i have access to, both on x64 and x86. SP2 is installed, by the way. It makes no difference, if the command line is started elevated or not.

Did anyone here ever use it on vista?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Do you run the klist in an elevated command prompt (run as administrator)?
Have you configured kerberos on the vista machines via server?
http://technet.microsoft.com/en-us/library/cc776647.aspx
Reboot required.
Distinguished Expert 2018

Author

Commented:
@snusgubben: I wrote that I ran it elevated, yes. But it should make no difference anyway.
@joinaunion: I want to use klist to purge old tickets. Why should I have to configure anything at the server side? What modification do you have in mind?
And please be aware that the policies you mention are applied to all machines - so why would the other OS' already succeed but only vista would fail?
Jackie Man IT Manager
Top Expert 2010

Commented:
Run sfc /scannow in elavated command prompt and try again.
Distinguished Expert 2018

Author

Commented:
What for? System files are not broken, it happens on all vista workstations I have access to (about 50, I tested via script).
Jackie Man IT Manager
Top Expert 2010

Commented:
It worth a trial as the error indicates that the resource required is not available.

If you never try, you never know the cause.
Distinguished Expert 2018

Author

Commented:
OK... I would never suppose 50 PCs at a time have broken system files, but nevermind. I tried - no repairs needed, situation unchanged.
Hopefully this will explain what I meant.
http://www.vistaheads.com/forums/microsoft-public-windows-vista-security/330542-kerberos-tgs-ip-address.html
Kerberos policy must be configured for each vista machine.Then use gpupdate.
Distinguished Expert 2018
Commented:
Let me explain why this does not matter:
What I would like to do with klist is purge tickets. If you tell me that vista does not even have kerberos tickets, then I ask you: why does win2008 have tickets or 2003 or win7 in the same domain without configuring that policy? All those OS' list their tickets and can purge them.

I found the reason why it fails: some fellow admin had distributed a wrong version of klist.exe (vista does not even have klist natively).  No I simply use the old klist.exe from win2k3 resourcekit and it works.
By the way: to automate purging, I use the following .vbs-script on vista, because the resourcekit klist purge does not purge silently without:
Set objShell = CreateObject("WScript.Shell")
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")

PurgeKerberosTickets

Sub PurgeKerberosTickets
objShell.run ("klist.exe purge")
wscript.sleep 500
Do While IsKListRunning
objShell.SendKeys "y"
wscript.sleep 100
Loop
wscript.quit
End Sub


Function IsKListRunning
Set colProcesses = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'klist.exe'")
If colProcesses.Count = 0 then
IsKListRunning = FALSE
Else
IsKListRunning = TRUE
End If
End function

Open in new window


Source: http://www.windows-api.com/microsoft/VBScript/35807970/how-do-i-send-text-to-klist-with-stdin.aspx

I needed the whole procedure to be able to change user/computer group membership without having to logoff/logon respectively reboot.
Glad you resolved the issue sorry i could not be of assitance.
Distinguished Expert 2018

Author

Commented:
self-resolved