[Fwd: [jcifs] DFS with jCIFS 1.2.3 and w2k3 sp1]
Thomas Bley
thomas.bley at simple-groupware.de
Sat Sep 10 00:32:21 GMT 2005
Hi, another thing I've noticed, I use this:
SmbFile f = new SmbFile(
"smb://administrator:admin@192.168.0.5/MyRoot/testlink/" );
System.out.println( f.getDfsPath() );
SmbFile[] fs = f.listFiles();
for (int i=0;i<fs.length;i++) {
System.out.println(fs[i].getName());
}
where "testlink" is a dfslink. It's strange that I get the right
contents with listFiles, is this a feature of w2k3 or does jCIFS
automatically connect to the linked-share ?
Do I need the dfsreferral things ?
Thanks and Bye,
Tom
-------- Original Message --------
Subject: [jcifs] DFS with jCIFS 1.2.3 and w2k3 sp1
Date: Sat, 10 Sep 2005 01:53:10 +0200
From: Thomas Bley <thomas.bley at simple-groupware.de>
Organization: Simple Groupware Solutions Thomas Bley
To: jcifs at lists.samba.org
Hi Mike,
I digged a bit deeper into DFS.
First I tried:
(192.168.0.5 is w2k3-server sp1 and "testlink" links to smb://testw2k3/temp)
SmbFile f = new SmbFile(
"smb://administrator:admin@192.168.0.5/MyRoot/testlink/" );
System.out.println( f.getDfsPath() );
This gave me:
jcifs.smb.SmbException: testw2k3
java.net.UnknownHostException: testw2k3
at jcifs.UniAddress.getByName(UniAddress.java:297)
at jcifs.UniAddress.getByName(UniAddress.java:201)
at jcifs.smb.SmbFile.send(SmbFile.java:672)
at jcifs.smb.SmbFile.queryPath(SmbFile.java:1200)
at jcifs.smb.SmbFile.exists(SmbFile.java:1256)
at jcifs.smb.SmbFile.getDfsPath(SmbFile.java:1379)
at GetDfsPath.main(GetDfsPath.java:8)
at jcifs.smb.SmbFile.send(SmbFile.java:674)
at jcifs.smb.SmbFile.queryPath(SmbFile.java:1200)
at jcifs.smb.SmbFile.exists(SmbFile.java:1256)
at jcifs.smb.SmbFile.getDfsPath(SmbFile.java:1379)
at GetDfsPath.main(GetDfsPath.java:8)
Exception in thread "main"
Then I put the hostname "testw2k3" into the lookup-file
winnt/system32/drivers/hosts:
e.g. "192.168.0.5 testw2k3"
Then it gave me (no exception):
smb://testw2k3/temp
seems like there is a lookup for "testw2k3" going on ?
When I set the dfslink to "smb://192.168.0.5/temp" there is no lookup.
bye
Tom
More information about the jcifs
mailing list