[jcifs] Access denied when listing shares on a server with
Guest account disabled
Michael B Allen
mba2000 at ioplex.com
Wed Jun 1 00:48:22 GMT 2005
On Tue, 31 May 2005 08:38:43 +0100
Matt Todd <m.todd at vqual.com> wrote:
> 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
Every account must be associated with a domain or machine. The above
credentials are null\Administrator which is a non-existant account and
therefore will likely cause the server to fallback to logging the user
in as GUEST. It is odd that this works with jcifs-1.1.11 because jCIFS
deliberately blocks the GUEST account unless the username "guest" is used.
Anyway, I think you want MACHINENAME\Administrator or DOMAIN\Administrator
rather than null\Administrator.
More information about the jcifs