AW: [jcifs] Member in Domain?

Müller Jens Jens.Mueller at
Mon Dec 9 21:41:19 EST 2002

Hi Eric,

I tried to generate an UniAdress-Object with:
UniAddress domainController = UniAddress.getByName("NAME-OF-DC");

It takes about 5 seconds, until I get an object. (is it normal?)
With this object I called the method below and received the following

jcifs.smb.SmbAuthException: Access denied

Do you have an idea, what could be the reason for it?


> If you have obtained a non-null NtlmPasswordAuthentication object from the

> doAuthentication call (i.e., the client has responded with a well-formed
> message), and you want to check if the response will successfully
> them against a specific domain, you should be able to do:
> public boolean isInDomain(NtlmPasswordAuthentication np,
>         UniAddress domainController, String domain) throws IOException {
>     try {
>         if (!domain.equalsIgnoreCase(np.getDomain())) return false;
>         SmbSession.logon(domainController, np);
>         return true;
>     } catch (SmbAuthException ex) {
>         return false;
>     }
> }
> The domainController above should be the same box which produced the
> challenge, i.e. via SmbSession.getChallenge(domainController)
> Eric

More information about the jcifs mailing list