<!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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>// code segment start</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<EM>NtlmAuthenticator.setDefault( this 
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String smbURL= 
"smb://";</EM></FONT></DIV>
<DIV><FONT face=Arial size=2><EM></EM></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SmbFile 
file = new SmbFile( smbURL 
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SmbFile[] files 
=file.listFiles();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 
&lt;---- This line is generating "access&nbsp;is denied "</EM></FONT><FONT 
face=Arial size=2><EM>&nbsp;&nbsp;&nbsp;exception</EM></FONT></DIV>
<DIV><FONT face=Arial 
size=2><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for( int i = 0; i 
&lt; files.length; i++ ) {</EM></FONT></DIV>
<DIV><FONT face=Arial 
size=2><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
// listing the networks/workgroups</EM></FONT></DIV>
<DIV><FONT face=Arial 
size=2><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</EM></FONT></DIV>
<DIV><EM><FONT face=Arial size=2></FONT></EM>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>This code works nicely at one server on my network 
while in another server in another network&nbsp;it is throwing 
AccessException.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Any help or suggestion is welcome.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks &amp; Regards.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Shuvankar Mukherjee</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>