jCIFS and Apple SMBX
Roger Thomas <[email protected]> Thu, 3 Sep 2015 18:25:13 +0000
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <1C2816D682737343A2EC6DF70C6B81EB116B4F@ORD2MBX08B.mex05.mlsrvr.com> |
--_000_1C2816D682737343A2EC6DF70C6B81EB116B4FORD2MBX08Bmex05ml_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
We are having trouble getting the jCIFS client to work with the newer SMBX.=
I have a 10.7.5 test machine where we have been testing. If I turn off=
SMBX and turn on the SMBUp everything works as expected. I am wonder if =
we need some client properties set to get it to work. We have been testin=
g with this snippet of code
NtlmPasswordAuthentication ntlm =3D new NtlmPasswordAuthentication( ntdo=
m, user, pass );
try {
SmbFile f1 =3D new SmbFile( "smb://@"+host+"/",ntlm );
files =3D f1.list();
for( int i=3D0; i< files.length; i++) {
out.println( "<tr><td></td><td>" + files[i] + "</td></tr>");
}
}catch(Exception e){
e.printStackTrace();
}
Yields....
INFO (09/03) 13:39:41 [stderr](Thread qtp1493657028-148): jcifs.smb.SmbAut=
hException: Logon failure: unknown user name or bad password.
INFO (09/03) 13:39:41 [stderr](Thread qtp1493657028-148): at jcifs.sm=
b.SmbSession.sessionSetup(SmbSession.java:406)
INFO (09/03) 13:39:41 [stderr](Thread qtp1493657028-148): at jcifs.sm=
b.SmbSession.send(SmbSession.java:218)
I can get you the full debug of this code working ( SMBup / Samba ) and wit=
h it not working ( SMBX ). I can also get packet traces of the same.
Roger Thomas
--_000_1C2816D682737343A2EC6DF70C6B81EB116B4FORD2MBX08Bmex05ml_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html dir=3D"ltr">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" id=3D"owaParaStyle"></style>
</head>
<body fpstyle=3D"1" ocsi=3D"0">
<div style=3D"direction: ltr;font-family: Tahoma;color: #000000;font-size: =
10pt;">
<div style=3D"font-size: 13.3333330154419px;">We are having trouble getting=
the jCIFS client to work with the newer SMBX. I have a 10.7.5 test =
machine where we have been testing. If I turn off SMBX and turn on t=
he SMBUp everything works as expected. I am
wonder if we need some client properties set to get it to work. We =
have been testing with this snippet of code</div>
<div style=3D"font-size: 13.3333330154419px;"><br>
</div>
<div style=3D"font-size: 13.3333330154419px;"> NtlmPasswordAuth=
entication ntlm =3D new NtlmPasswordAuthentication( ntdom, user, pass );</d=
iv>
<div style=3D"font-size: 13.3333330154419px;"> try {</div>
<div style=3D"font-size: 13.3333330154419px;"> SmbFile f1 =3D =
new SmbFile( "smb://@"+host+"/",ntlm );</div>
<div style=3D"font-size: 13.3333330154419px;"> </div>
<div style=3D"font-size: 13.3333330154419px;"> files =3D f1.li=
st();</div>
<div style=3D"font-size: 13.3333330154419px;"> for( int i=3D0;=
i< files.length; i++) {</div>
<div style=3D"font-size: 13.3333330154419px;"> out.prin=
tln( "<tr><td></td><td>" + files[i] &=
#43; "</td></tr>");</div>
<div style=3D"font-size: 13.3333330154419px;"> }</div>
<div style=3D"font-size: 13.3333330154419px;"> </div>
<div style=3D"font-size: 13.3333330154419px;"> }catch(Exception=
e){</div>
<div style=3D"font-size: 13.3333330154419px;"> <span class=3D"A=
pple-tab-span" style=3D"white-space: pre;">
</span>e.printStackTrace();</div>
<div style=3D"font-size: 13.3333330154419px;"> </div>
<div style=3D"font-size: 13.3333330154419px;"> }</div>
<div style=3D"font-size: 13.3333330154419px;"><br>
</div>
<div style=3D"font-size: 13.3333330154419px;">Yields....</div>
<div style=3D"font-size: 13.3333330154419px;"><br>
</div>
<div style=3D"font-size: 13.3333330154419px;">
<div>INFO (09/03) 13:39:41 [stderr](Thread qtp1493657028-148): jcifs.=
smb.SmbAuthException: Logon failure: unknown user name or bad password.</di=
v>
<div>INFO (09/03) 13:39:41 [stderr](Thread qtp1493657028-148): =
at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:406)</di=
v>
<div>INFO (09/03) 13:39:41 [stderr](Thread qtp1493657028-148): =
at jcifs.smb.SmbSession.send(SmbSession.java:218)</div>
</div>
<div style=3D"font-size: 13.3333330154419px;"><br>
</div>
<div style=3D"font-size: 13.3333330154419px;"><br>
</div>
<div style=3D"font-size: 13.3333330154419px;">I can get you the full debug =
of this code working ( SMBup / Samba ) and with it not working ( SMBX ). &n=
bsp; I can also get packet traces of the same.</div>
<div style=3D"font-size: 13.3333330154419px;"><br>
<div><font size=3D"2" face=3D"Tahoma">
<p class=3D"MsoNormal" style=3D"margin: 0in 0in 0pt; font-family: Calibri, =
sans-serif;">
<font size=3D"2">Roger Thomas</font></p>
</font></div>
</div>
</div>
</body>
</html>
--_000_1C2816D682737343A2EC6DF70C6B81EB116B4FORD2MBX08Bmex05ml_--