[jcifs] Problem connecting to a samba file share
Michael B Allen
ioplex at gmail.com
Mon Feb 9 18:24:10 GMT 2009
On Mon, Feb 9, 2009 at 12:12 PM, Hite, Sharon (NIH/NIEHS) [E]
<hite1 at niehs.nih.gov> wrote:
> I am trying to troubleshoot a problem connecting to a samba file share. I
> can connect manually, but when I use JCIFS to connect, I get this message:
> [2009-02-09 16:49:05,648] ERROR appLog The specified share name
> //devwww/devwww cannot be found.
> java.io.IOException: transport closed in negotiate
> at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:276)
What version of JCIFS are you using?
What version of Samba are you using?
> My application has had no problems connecting for over two years so I don't
> think it's my code. However, I need some ideas on where to look to resolve
> this issue.
So what has changed?
Does Samba require NTLMv2 now? If so you must use JCIFS 1.3.
Are you suddenly using JCIFS 1.3 and now it's broken? If so, then
you're probably using an older version of Samba and you need to set
useExtendedSecurity=false and lmCompatibility=0 to fall-back to
> For reference, here is the code I use to test connections:
> jcifs.Config.setProperty( "jcifs.netbios.client.writeSize",
> jcifs.Config.setProperty( "jcifs.netbios.client.snd_buf_size",
You really shouldn't mess with these properties.
> jcifs.Config.setProperty("jcifs.smb.lmCompatibility","3"); // Allows
> use of LMv2
Note that JCIFS never uses or ever used LMv2 hashes at all (yeah, the
documentation is basically wrong - it's just a description of what
lmCompatiblity *should* do and not what JCIFS really does). JCIFS 1.3
uses NTLMv2 hashes by default (and not LMv2 at all). And prior to 1.3
it used NTLMv1 hashes.
Michael B Allen
Java Active Directory Integration
More information about the jcifs