[jcifs] SmbFile.exist: subnet, connection to domain controller
Michael B Allen
ioplex at gmail.com
Wed Dec 9 12:23:05 MST 2009
On Wed, Dec 9, 2009 at 6:40 AM, Jean-Marc Autexier <jmau2002 at web.de> wrote:
>> > Hi Jean-Marc,
>> >
>> > That communication with the DC is for DFS. If you use a fully
>> > qualified DNS hostname I think JCIFS will not try to do the DFS root
>> > referrals. You should always use a fully qualified DNS hostname anyway
>> > to avoid common name service problems. But I'm not sure if that alone
>> > will stop JCIFS from trying to do DFS. If this is the case, you can
>> > set jcifs.smb.client.dfs.disabled = true in which case JCIFS should
>> > not try to perform DFS root referrals.
>> >
>> >
>> This sounds logical, but why is DFS done for the domain name?
>> I'm not sure the full domain name will help as the domain is unknown in
>> the network in which my application is running.
>> I will try later to disable dfs and update you.
>
>
> Ok, just tried it (jcifs.smb.client.dfs.disabled = true) and it works. No DFS root referral anymore.
>
> Question: why does jcifs does a DFS root referal by default?
Hi Jean-Marc,
Because if you supply an SMB URL like:
smb://foo.example.com/path/to/file
JCIFS cannot know if foo.example.com is a domain or hostname.
Also I was wrong about JCIFS not trying domain-based DFS referrals if
a fully qualified DNS hostname is provided. Regardless of what name is
supplied, JCIFS does not know in advance if the name is or is not a
domain and thus it must query the DC.
In the future DNS SRV lookups could probably help determine if DFS
referrals should be performed. But in practice we will probably always
try to communicate with a DC on startup for one reason or another.
Mike
--
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/
More information about the jCIFS
mailing list