[jcifs] smbtree

Shiran Silviano shiransilviano at gmail.com
Tue Jan 26 15:58:19 UTC 2016


Hi,
I try to get the smbTree list - (all computers in the lan ) by this code:


SmbFile[] domains = (new SmbFile("smb://",a)).list();
for (int i = 0; i < domains.length; i++) {
SmbFile[] servers = domains[i].listFiles();
for (int j = 0; j < servers.length; j++) {
System.out.println("\t" + servers[j].getPath());
}
}
When the domain is secured i get this exception:
jcifs.smb.SmbAuthException: Logon failure: unknown user name or bad
password.
The ubuntu terminal command - "smbtree" returns the list of all the
computers in my lan.

Is there a way to get the computer's list with jcifs?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20160126/a3f90bf8/attachment.html>


More information about the jCIFS mailing list