[jcifs] SmbAuthException while calling list() on a SmbFile("smb://").

Michael P. Jung suriver at gmail.com
Mon Sep 6 18:32:28 GMT 2004


Hi,

I'm pretty new to JCIFS and simply can't figure out how to use it to
browse a network full of different workgroups.

I expected this to list all available workgroups in my LAN:

--snip--

SmbFile smb = new SmbFile("smb://")

SmbFile[] files = smb.listFiles();
for (int i=files.length-1; i>=0; i--) {
    System.out.println(files[i].getName());
}

--snip--

All I get is a SmbAuthException:
Exception in thread "main" jcifs.smb.SmbAuthException: Logon failure:
unknown user name or bad password.

I also tried to set jcifs.smb.client.username, password and domain to
"guest" and "" but no combination worked for me.


Thanks,
Michael


More information about the jcifs mailing list