--=-LVvkf225JzqgWBvDCZvD
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Sat, 2004-09-11 at 03:09, Yimin Chen wrote:
> Hi Andrew,
>=20
>=20
> Thank you very much for your reply! I have some more questions inline
>=20
> At 06:44 PM 9/10/2004 +1000, Andrew Bartlett wrote:
> >On Fri, 2004-09-10 at 10:02, Yimin Chen wrote:
> > > Hi Andrew,
> > >
> > > Thank you very much for the suggestion. I wasn't aware at all that
> > > winbind_request APIs are not for external use.
> > >
> > >
> > > Now Looking at the ntlm_auth tool again, I have a few more questions:
> > >
> > > 1) What is the option to retrieve the challenge from the server? In t=

he
> > > NTLM authentication case, we need to pass the challenge back to clien=

t,
> > > and then retrieve the NT LM responses from client response, and pass =

the
> > > callenge as well as the NT LM responses to the ntlm_auth tool, right?
> > >
> > > I must have missed something, but can't figure out.

> >
> >Are you doing NTLM or NTLMSSP? What is the target protocol? (MSCHAP?
> >MSCHAPv2? NTLMSSP/HTTP?)

>=20
> [YM] It is HTTP ntlm authentication that we are trying to do. So I guess =

it=20
> is NTLMSSP/HTTP? What is the difference between NTLM/NTLMSSP? I had thoug=

ht=20
> they are same.


When I talk about these authentication protocols, I refer to any scheme
that just passes 8 bytes of challenge, and 24/>=3D24 bytes of response as
an NTLM client. This is typical in CIFS, before 'extended security'.=20
MS would also calls this MSCHAP, because this exactly what they did for
their PPP and VPN solution (gag!).

NTLMSSP is the blob-based authentication scheme, where the client
intiates the session with a much longer NTLMSSP 'Negotiate' packet,
which any intermediate application does not need a parse. The design of
this protocol is such that NTLMSSP should be passed to the 'security
engine' unmodified. (ntlm_auth takes the role of SSPI, if you
application was on Windows)

You may have code, such as the apache 'mod_ntlm' or similar that parses
this code. This should not be used, in any way. Instead, by passing
the entire blob to Samba's ntlm_auth, it can parse it, and handle the
whole process. =20

Then ntlm_auth generates the challenge internally, and wraps it up in an
NTLMSSP challenge packet, and asks your application to return it to the
client. ntlm_auth then expects an NTLMSSP negotiate packet, which
included details about usernames and passwords inline.

At no stage should you ever need to base64 decode the NTLMSSP data from
the client, as ntlm_auth expects it unmodified (and conveniently, it
expects it in base64 :-).

> >Fundamentally, ntlm_auth operates as a privileged client in the domain,
> >and the challenge is either generated inside the helper, or supplied to
> >it, depending on mode of operation.

> [YM] I see. Could you please clarify for me whether my following=20
> understanding is correct?
>=20
> So the client machine our proxy process running should first join the=20
> domain as a privileged client, and then the proxy process can generate th=

e=20
> challenge ourselves every time we want to authenticate an HTTP client, an=

d=20
> then pass the challenge/NT LM responses to the ntlm_auth binary to=20
> authenticate the user. Is this correct? Or ntlm_auth will itself join the=

=20
> domain automatically?


Incorrect.

You must use Samba tools to join Samba to the domain, and configure
winbind to talk to the domain controller. Then Samba's ntlm_auth can be
asked to handle the entire NTLMSSP layer. It will return a username,
and as per our earlier conversation, could be asked to return a series
of groups.

Andrew Bartlett

--=20
Andrew Bartlett abartlet@samba.org
Authentication Developer, Samba Team http://samba.org
Student Network Administrator, Hawker College abartlet@hawkerc.net

--=-LVvkf225JzqgWBvDCZvD
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBBQjE5w6AkmCjZ77cRAuKxAJ9r0n9NpyonB7o3SfejWE WTq3jaKwCfQuhz
f1IbExxJindm9oc8/nEIM5Q=
=+rz7
-----END PGP SIGNATURE-----

--=-LVvkf225JzqgWBvDCZvD--