[jcifs] problem browsing through smb://
Shuvankar Mukherjee
shuvankr at hotmail.com
Thu Aug 6 08:44:09 MDT 2009
Hello,
I am trying to get browse through "smb://" for a listing of Domains and Workgroup present in the network.
// code segment start
NtlmAuthenticator.setDefault( this );
String smbURL= "smb://";
SmbFile file = new SmbFile( smbURL );
SmbFile[] files =file.listFiles(); // <---- This line is generating "access is denied " exception
for( int i = 0; i < files.length; i++ ) {
// listing the networks/workgroups
}
// code segment start
This code works nicely at one server on my network while in another server in another network it is throwing AccessException.
Aug 06, 2009 09:34:01 AM [INFO] : [ERROR] Exception MessageAccess is denied.
Aug 06, 2009 09:34:01 AM [INFO] : [ERROR]jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:515)
Aug 06, 2009 09:34:01 AM [INFO] : [ERROR]jcifs.smb.SmbTransport.send(SmbTransport.java:604)
Aug 06, 2009 09:34:01 AM [INFO] : [ERROR]jcifs.smb.SmbSession.send(SmbSession.java:240)
Aug 06, 2009 09:34:01 AM [INFO] : [ERROR]jcifs.smb.SmbTree.send(SmbTree.java:109)
Aug 06, 2009 09:34:01 AM [INFO] : [ERROR]jcifs.smb.SmbFile.send(SmbFile.java:718)
Aug 06, 2009 09:34:01 AM [INFO] : [ERROR]jcifs.smb.SmbFile.doNetServerEnum(SmbFile.java:1863)
Aug 06, 2009 09:34:01 AM [INFO] : [ERROR]jcifs.smb.SmbFile.doEnum(SmbFile.java:1668)
Aug 06, 2009 09:34:01 AM [INFO] : [ERROR]jcifs.smb.SmbFile.listFiles(SmbFile.java:1649)
Aug 06, 2009 09:34:01 AM [INFO] : [ERROR]jcifs.smb.SmbFile.listFiles(SmbFile.java:1582)
The user used in the NTLMAuthenticator is a domain user and when logged in to the server with the same user name, it can browse the whole network from Windows explorer.
The user account used here is a domain admin account. What role should I set this user so that the list of workgroups come up like it used to?
Any help or suggestion is welcome.
Thanks & Regards.
Shuvankar Mukherjee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20090806/205ff94a/attachment.html>
More information about the jcifs
mailing list