2011-11-07 88 views
4

我在Windows 7(64位)上,我創建了一個簡單的應用程序來計算實現PrivilegedAction的類的run方法中的文件。以下是我的jaas.conf文件:Kerberos緩存票

 
CountFiles { 
    com.sun.security.auth.module.Krb5LoginModule required 
    useTicketCache=true 
    debug=true; 
}; 

我收到以下消息。

 
Debug is true storeKey false useTicketCache true useKeyTab false doNotPrompt false ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false 
Acquire TGT from Cache 
Credentials are no longer valid 
Principal is null 
null credentials from Ticket Cache 

和程序後拋出LoginException異常,但是如果我執行kinit.exe在Windows命令行,然後它能夠​​給我計數。

我還設置了以下注冊表值,以1:

 
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters 
Value Name: AllowTGTSessionKey 
Value Type: REG_DWORD 
Value: 1 

能否請你告訴如何訪問緩存系統上的Kerberos票據?

謝謝。 \用戶:

+0

Windows 2008服務器上的相同問題 – Eero

回答

5

我通過在C刪除krb5cc *文件的文件夾在我的用戶名找到了答案,我的問題。該文件是由kinit.exe創建的。

相關問題