Re: Domain usage

Jeff Schindler <[email protected]> Thu, 15 Sep 2016 15:00:27 -0400
Newsgroups gmane.network.samba.java
Message-ID <CAKWEaqHbZhr6HgJ=tHMhQzeCZO4-=JqoY-7kqTNne_M9en2Npw@mail.gmail.com>
--94eb2c05fb20837078053c907524
Content-Type: text/plain; charset=UTF-8

Hi Mike,

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

On Fri, Sep 9, 2016 at 1:29 AM, Michael B Allen <[email protected]> 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.

Jeff


>
> Mike
>
> --
> Michael B Allen
> Java Active Directory Integration
> http://www.ioplex.com/
>
> On Tue, Sep 6, 2016 at 11:23 AM, Jeff Schindler <[email protected]> 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
>

--94eb2c05fb20837078053c907524
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Mike,<div><br></div><div>Thanks for the response.=C2=A0=
 My responses inline below...</div><div class=3D"gmail_extra"><br><div clas=
s=3D"gmail_quote">On Fri, Sep 9, 2016 at 1:29 AM, Michael B Allen <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">ioplex@g=
mail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">Hi Jeff,<br>
<br>
Are you using an account that is also on the local machine (like<br>
Administrator)? If yes, and you leave out the domain, the server might<br>
use the local account instead of the domain account of the same name<br>
in which case you might see a difference in bahavior.<br></blockquote><div>=
<br></div><div>No - the account I am testing with is unique to the CIFS ser=
ver.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex=
">
<br>
This is a wild guess though. You could test this by a) using an<br>
account that is only in the domain or b) use the local machine name as<br>
the domain (look at netbios name in ipconfig /all on server but it&#39;s<br=
>
almost always the first label of the DNS name). If you no longer see a<br>
difference in behavior then that would suggest the server is using<br>
different accounts that happen to have the same name.<br></blockquote><div>=
<br></div><div>The account I am using is only in the &quot;test&quot; domai=
n on the server.=C2=A0 The account was setup specifically for me to test wi=
th, so I&#39;m fairly certain its the only account with that name on that s=
erver.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1=
ex">
<br>
This is why you should ALWAYS supply a domain in your credentials.<br></blo=
ckquote><div><br></div><div>The client&#39;s concern (I&#39;m developing an=
 FS for the client) is that since the Mac users *can* login without a domai=
n, then they *will* and then run into these issues.=C2=A0 I am not sure why=
 SMB is allowing it.=C2=A0 I&#39;ve tried passing in various &quot;default&=
quot; domains to JCIFS (&quot;.&quot;, &quot;$HOSTNAME&quot;, &quot;NONE&qu=
ot;), but nothing seems to work but the actual domain name.=C2=A0 I should =
also note that we are using NTLM authentication, but that doesn&#39;t seem =
to make a difference - specifying the credentials inline with the URL has t=
he same effect sans domain name.</div><div>=C2=A0</div><blockquote class=3D=
"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2=
04,204,204);padding-left:1ex">
<br>
If tha&#39;ts not the problem, whats is the server? Is it special in any<br=
>
way (like a NAS appliance or really old)?<br></blockquote><div><br></div><d=
iv>The client says &quot;Yes, we are using NAS as the source share and it&#=
39;s SMB protocol stack could well be old.&quot;</div><div><br></div><div>T=
hanks for any other insight you can provide.</div><div><br></div><div>Jeff<=
/div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px=
 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Mike<br>
<br>
--<br>
Michael B Allen<br>
Java Active Directory Integration<br>
<a href=3D"http://www.ioplex.com/" rel=3D"noreferrer" target=3D"_blank">htt=
p://www.ioplex.com/</a><br>
<br>
On Tue, Sep 6, 2016 at 11:23 AM, Jeff Schindler &lt;<a href=3D"mailto:jas00=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; We are using JCIFS from a Mac to get certain NTFS attributes from a SM=
B<br>
&gt; share (via SmbFile::getAttributes).=C2=A0 We can log into the SMB shar=
e without a<br>
&gt; domain via the Mac OS and all seems to function normally.=C2=A0 We can=
 also make<br>
&gt; a connection to the SmbFile via JCIFS without the domain, however, whe=
n we<br>
&gt; call getAttributes on that SmbFile, it always returns 0.=C2=A0 If we a=
dd the<br>
&gt; domain back in, it returns the correct attributes.=C2=A0 Does anyone h=
ave any<br>
&gt; idea why this might be happening?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Jeff<br>
</blockquote></div><br></div></div>

--94eb2c05fb20837078053c907524--