[jcifs] Domain usage

Jeff Schindler jas001 at gmail.com
Thu Sep 15 19:00:27 UTC 2016

Hi Mike,

Thanks for the response.  My responses inline below...

On Fri, Sep 9, 2016 at 1:29 AM, Michael B Allen <ioplex at gmail.com> wrote:

> Hi Jeff,
> Are you using an account that is also on the local machine (like
> Administrator)? If yes, and you leave out the domain, the server might
> use the local account instead of the domain account of the same name
> in which case you might see a difference in bahavior.

No - the account I am testing with is unique to the CIFS server.

> This is a wild guess though. You could test this by a) using an
> account that is only in the domain or b) use the local machine name as
> the domain (look at netbios name in ipconfig /all on server but it's
> almost always the first label of the DNS name). If you no longer see a
> difference in behavior then that would suggest the server is using
> different accounts that happen to have the same name.

The account I am using is only in the "test" domain on the server.  The
account was setup specifically for me to test with, so I'm fairly certain
its the only account with that name on that server.

> This is why you should ALWAYS supply a domain in your credentials.

The client's concern (I'm developing an FS for the client) is that since
the Mac users *can* login without a domain, then they *will* and then run
into these issues.  I am not sure why SMB is allowing it.  I've tried
passing in various "default" domains to JCIFS (".", "$HOSTNAME", "NONE"),
but nothing seems to work but the actual domain name.  I should also note
that we are using NTLM authentication, but that doesn't seem to make a
difference - specifying the credentials inline with the URL has the same
effect sans domain name.

> If tha'ts not the problem, whats is the server? Is it special in any
> way (like a NAS appliance or really old)?

The client says "Yes, we are using NAS as the source share and it's SMB
protocol stack could well be old."

Thanks for any other insight you can provide.


> Mike
> --
> Michael B Allen
> Java Active Directory Integration
> http://www.ioplex.com/
> On Tue, Sep 6, 2016 at 11:23 AM, Jeff Schindler <jas001 at gmail.com> wrote:
> > Hi,
> >
> > We are using JCIFS from a Mac to get certain NTFS attributes from a SMB
> > share (via SmbFile::getAttributes).  We can log into the SMB share
> without a
> > domain via the Mac OS and all seems to function normally.  We can also
> make
> > a connection to the SmbFile via JCIFS without the domain, however, when
> we
> > call getAttributes on that SmbFile, it always returns 0.  If we add the
> > domain back in, it returns the correct attributes.  Does anyone have any
> > idea why this might be happening?
> >
> > Thanks,
> > Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20160915/cc323c6b/attachment.html>

More information about the jCIFS mailing list