[jcifs] Re: Authentication via SmbSession.logon

Michael B Allen mba2000 at ioplex.com
Thu Apr 14 18:26:00 GMT 2005


The KDE capture doesn't have the session setup communication. Try logging
out of your KDE session, log back in, and run your capture before trying to
access the target server.

But I think I see the problem. The AccountName field has MACH\name which
leads me to believe you are using
smb://MACH\\name:password@server/share/path/. The account name cannot have a
backslash in it. That is not a valid character in a URL. The 'MACH' part is
the domain. See the SmbFile API documentation for proper SMB URL usage. I
short I think you want smb://MACH;name:password@server/share/path/.

Mike

PS: You should not use credentials in the URL at all. Put them somewhere
else and build your SmbFile with an NPA like:

NtlmPasswordAuthentication npa = new NtlmPasswordAthentication( "MACH",
"name", "password" );
SmbFile file = new SmbFile( url, npa );

On Thu, 14 Apr 2005 12:27:49 +0200
Esteve Boix <esteveb at gmail.com> wrote:

> Find them attached.
> 
> Thanks for your time and help,
> Esteve
> 
> On 4/14/05, Michael B Allen <mba2000 at ioplex.com> wrote:
> > Please send all messages (minus captures) to the jCIFS mailing list.
> > 
> > On Thu, 14 Apr 2005 09:14:22 +0200
> > Esteve Boix <esteveb at gmail.com> wrote:
> > 
> > > Dear Michael,
> > >
> > > I'm experiencing the same problem described in
> > > http://thread.gmane.org/gmane.network.samba.java/4102
> > >
> > > If I try to log on to a machine attached to a domain using a local
> > > user, I have to use MACHINENAME\user as username, but jCIFS refuses to
> > > log in, and using the same URL in KDE (copying and pasting it) works
> > > perfectly.
> > > I'm trying to log on to a XP SP2 machine.
> > >
> > > If you want, I'll send you an Ethereal log of the traffic.
> > 
> > Please send me a capture of KDE succeeding and a capture jCIFS failing
> > with exactly the same URL. Then we'll get to the bottom of this.


More information about the jcifs mailing list