<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.5730.13" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am trying to get browse through "smb://" for a
listing of Domains and Workgroup present in the network.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>// code segment start</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<EM>NtlmAuthenticator.setDefault( this
);<BR>
<BR> String smbURL=
"smb://";</EM></FONT></DIV>
<DIV><FONT face=Arial size=2><EM></EM></FONT> </DIV>
<DIV><FONT face=Arial size=2><EM> SmbFile
file = new SmbFile( smbURL
);<BR> SmbFile[] files
=file.listFiles(); //
<---- This line is generating "access is denied "</EM></FONT><FONT
face=Arial size=2><EM> exception</EM></FONT></DIV>
<DIV><FONT face=Arial
size=2><EM> for( int i = 0; i
< files.length; i++ ) {</EM></FONT></DIV>
<DIV><FONT face=Arial
size=2><EM>
// listing the networks/workgroups</EM></FONT></DIV>
<DIV><FONT face=Arial
size=2><EM> }</EM></FONT></DIV>
<DIV><EM><FONT face=Arial size=2></FONT></EM> </DIV>
<DIV><EM><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>// code segment
start</FONT></DIV></FONT></EM></DIV>
<DIV><EM></EM> </DIV>
<DIV><FONT face=Arial size=2>This code works nicely at one server on my network
while in another server in another network it is throwing
AccessException.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN lang=EN>
<P><FONT size=2>Aug 06, 2009 09:34:01 AM [INFO] : [ERROR] Exception
MessageAccess is denied.</FONT></P>
<P><FONT size=2>Aug 06, 2009 09:34:01 AM [INFO] :
[ERROR]jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:515)</FONT></P>
<P><FONT size=2>Aug 06, 2009 09:34:01 AM [INFO] :
[ERROR]jcifs.smb.SmbTransport.send(SmbTransport.java:604)</FONT></P>
<P><FONT size=2>Aug 06, 2009 09:34:01 AM [INFO] :
[ERROR]jcifs.smb.SmbSession.send(SmbSession.java:240)</FONT></P>
<P><FONT size=2>Aug 06, 2009 09:34:01 AM [INFO] :
[ERROR]jcifs.smb.SmbTree.send(SmbTree.java:109)</FONT></P>
<P><FONT size=2>Aug 06, 2009 09:34:01 AM [INFO] :
[ERROR]jcifs.smb.SmbFile.send(SmbFile.java:718)</FONT></P>
<P><FONT size=2>Aug 06, 2009 09:34:01 AM [INFO] :
[ERROR]jcifs.smb.SmbFile.doNetServerEnum(SmbFile.java:1863)</FONT></P>
<P><FONT size=2>Aug 06, 2009 09:34:01 AM [INFO] :
[ERROR]jcifs.smb.SmbFile.doEnum(SmbFile.java:1668)</FONT></P>
<P><FONT size=2>Aug 06, 2009 09:34:01 AM [INFO] :
[ERROR]jcifs.smb.SmbFile.listFiles(SmbFile.java:1649)</FONT></P>
<P><FONT size=2>Aug 06, 2009 09:34:01 AM [INFO] :
[ERROR]jcifs.smb.SmbFile.listFiles(SmbFile.java:1582)</FONT></P></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any help or suggestion is welcome.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks & Regards.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Shuvankar Mukherjee</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>