1

Is it possible using jcifs to list all smb servers available on the network? I tried a suggestion on another post of passing smb:// to the SmbFile constructor but that didn't give me any results. Whereas I am able to pass smb://username:password@machinename and that works fine. Other computers are able to find machinename without problems and even another Android app is able to see it using SMB.

1 Answer 1

1

The list of servers is not available through the SMB protocol itself. To receive such a list the client must implement LSA and SAMR protocols. Both are DCERPC pipes. JCIFS features a generic DCERPC framework but, as far as I know, it does not implement the required LSA and SAMR. Alternative SMB clients: smbclient, NQE and jNQ do implement these calls.

1
  • Thanks, that's very useful.
    – casolorz
    Commented Jan 20, 2018 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.