[jcifs] So how does JCIFS get the username

André Warnier aw at ice-sa.com
Thu Apr 23 13:56:47 GMT 2009


Sorry Giampaolo, I meant to send this to the list..

Giampaolo Tomassoni wrote:
>> From: Bill Comer
>> Sent: Thursday, April 23, 2009 1:58 PM
>>
>> I was wonderring how JCIFS gets the username on a Windows PC that it then
> uses to authenticate,
> 
> You're probably speaking about the NtlmHttpFilter.
> 
> It is the client (IE, in example) which sends authentication data in behalf
> of the user, not jcifs. The latter eventually routes them to an
> authentication server, but it doesn't (almost) know what that data contain.
> 
Still if the OP is talking about the HTTP filter, then one thought that
comes to mind is that Firefox can also do NTLM authentication.
Since the Firefox code is open source, you could always go look there.
I don't think that there is any particular secret in getting the
logged-in Windows userid though.  There must be published Windows API
calls to do that. Getting his password is something else entirely.

But, at which level exactly do you want to obtain the user-id of the
logged-in user ?



More information about the jcifs mailing list