Win2000 Pro RC2 can't find the Domain controller

Richard Sharpe sharpe at
Mon Nov 15 04:07:57 GMT 1999

At 09:03 PM 11/15/99 +1100, Matt Chapman <matty at> wrote:
>On Mon, Nov 15, 1999 at 08:50:02PM +1100, Richard Sharpe wrote:
>> OK, based on Matt's comments, I have got further.  Win2000 will now send
>> the SAM LOGON request from client, but even though Samba responds OK,
>> Win2000 ignores the response.
>Yep, cool, that's point (b) done. Now if I remember correctly the main 
>problem with the SAMLOGON is SID misalignment. 
>The parsing code goes like:
>      q += 4;
>      domainsidsize = IVAL(q, 0);
>      q += 4;
>      q += domainsidsize;
>      q = align4(q, buf);
>      q += 2;

Damn good memory.  I see it all, she loves another ... oops, wrong.

The q += 2 is wrong. We are already aligned ... This puts the following out
by two and screws things up and Win2000 don't like it.

>      ntversion = IVAL(q, 0);
>      q += 4;
>Which is slightly off. If you turn up your debug level to 3+ you will see:

Fixing it now.  Will report on success later.  Will have to try NT WKS
logging onto the domain as well.

>process_logon_packet: SAMLOGON sidsize 0 ntv 0
>or something like that (if ntv != 0, then it gives you a clue where it is
>taking it from). You need to fiddle with the alignments above until
>you get ntversion 0x11 or similar, which is a couple of bytes further along 
>the packet (or further back).
>	Matt
>Matthew "Austin" Chapman
>SysAdmin, Developer, Samba Team Member

Richard Sharpe, sharpe at, Master Linux Administrator :-),
Samba (Team member,, Ethereal (Team member,
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course

More information about the samba-ntdom mailing list