AW: [jcifs] Access DFS root shares

Finkenzeller, Stefan Stefan.Finkenzeller at
Tue Aug 17 12:07:02 GMT 2004


I've the same problem (with jCIFS 0.8.x, 0.9.5, 0.9.7) and I think jCIFS
cannot access to DFS which is Active Directory integrated. If you specify
the server in the DFS URL (e.g. smb://host.domain/dfsshare/) jCIFS can
access to DFS on this server but if you specify only the domain/dfsroot
(e.g. smb://dfsroot/dfsshare/) then jCIFS have to read the DFS definition
from the Active Directory... (and not wins).

Is it possible to add AD-integrated DFS support in jCIFS?


-----Ursprüngliche Nachricht-----

Steve Foster said:
> Hi,
> I'm trying to access a DFS root share to do some testing but jCIFS doesn't
> seem to be accessing it correctly:
> using the List class from the examples if I go:
> smb://user:pass@host.domain/dir/dir/user/
> I get a list of files, but:
> smb://user:pass@dfsroot.domain/dir/dir/user/
> i get the following:
> Exception in thread "main" jcifs.smb.SmbException: The network name cannot
> be found.
>         at jcifs.smb.SmbTransport.send(
>         at jcifs.smb.SmbSession.send(
>         at jcifs.smb.SmbTree.treeConnect(
>         at jcifs.smb.SmbFile.connect(
>         at jcifs.smb.SmbFile.connect0(
>         at jcifs.smb.SmbFile.sendTransaction(
>         at jcifs.smb.SmbFile.doFindFirstNext(
>         at jcifs.smb.SmbFile.list(
>         at jcifs.smb.SmbFile.list(
>         at List.main(
> dns for the dfsroot.domain contains the address's for the AD servers of
> the network. so I think that is trying to connect to them.
> snoop of network traffic:
>         testsvr -> BROADCAST    NBT NS Query Request for
> DFSROOT.DOMAIN[20], Success
>         testsvr -> BROADCAST    NBT NS Query Request for
> DFSROOT.DOMAIN[20], Success

If you take BCAST out of the jcifs.resolveOrder you'll bypass these
useless broadcast lookups.

>         testsvr -> adcont.domain NBT C port=33866
>         testsvr -> adcont.domain NBT C port=33866
> adcont.domain -> testsvr         NBT R port=33866
>         testsvr -> adcont.domain NBT Type=SESSION REQUEST Dest=DFSROOT[20]
> Source=JCIFS77_140_AA[0] Length=68
>         testsvr -> adcont.domain NBT C port=33866
> adcont.domain -> testsvr         NBT Type=NEGATIVE SESSION RESPONSE
> Length=1
>         testsvr -> adcont.domain NBT C port=33866

Need a better packet capture.

What happends if you try the IP address or the NetBIOS name (assuming
there is one).

Does 0.8 work?

I really need a real packet capture [1]. Ideally I would also need a
capture of Windows 2000 resolving and connecting to dfsroot and being
redirected is necessary to properly emulate the desired behavior exactly.
E.g. run netmon on the W2K client, go Start > Run >

-------------- next part --------------


More information about the jcifs mailing list