[jcifs] listFiles() to get all servers in a workgroup

Michael B Allen ioplex at gmail.com
Mon Aug 3 14:48:21 MDT 2009

On Mon, Aug 3, 2009 at 9:03 AM, Florian<f.scholz at arics.de> wrote:
> Hello,
> I try to list all servers in a workgroup with listFiles() and always get an
> exception:
> 'jcifs.smb.SmbAuthException: Logon failure'.
> One of the servers is running Windows 2003 Server. I think there's a problem
> with authentication.
> Isn't it possible to list the servers with jcifs in that environment without
> authentication information? How to do that? Other smb-clients, e.g. on linux,
> are able to show the servers.
> I use the latest jcifs (1.3.11).

Hi Florian,

It should work. If credentials are not supplied, the default is
"GUEST". If you have default credentials set, try manually supplying a
blank domain and password and username "GUEST". Also try

If that all fails, get a capture of one of the other clients
successfully listing servers, look at it with WireShark and then
supply the same credentials.

Note that listing servers requires NetBIOS browse service which is not
terribly common anymore. JCIFS still supports it but the environments
will eventually not.


Michael B Allen
Java Active Directory Integration

More information about the jcifs mailing list