[jcifs] Access denied when listing shares on a server with
Guest account disabled
Matt Todd
m.todd at vqual.com
Tue May 31 07:38:43 GMT 2005
The following code will work if the guest account is enabled on the
host, however if the guest account is not enabled, an exception is
thrown with the message 'access denied'. Why does listing shares not
work as a non-guest user?
NtlmPasswordAuthentication authentication = new
NtlmPasswordAuthentication(null,"Administrator","adminpassword");
SmbFile smbFile = new SmbFile("smb://" + <hostname> + "/",
authentication);
String[] shares = smbFile.list();
On Fri, 2005-05-20 at 16:08 -0400, Michael B Allen wrote:
> On Fri, 20 May 2005 12:28:20 +0100
> Matt Todd <m.todd at vqual.com> wrote:
>
> > Even though I am constructing a NtlmPasswordAuthentication object with a
> > domain (null), username and password it appears to be logging in as
> > guest when I call SmbFile.listFiles. It works if the server i'm browsing
> > has a guest account, but if i disable the guest account I get an access
> > denied message. Why does jcifs not use the login details provided?
>
> What credentials exactly do you wish to use? Post a trivial code sample.
>
> Mike
More information about the jcifs
mailing list