W2K joining domain

Jim McDonough jmcd at us.ibm.com
Fri Feb 23 23:28:12 GMT 2001


I'm trying to get my Win2k machine to join my 2.2 domain...

First, I had to get the ctr field initialized in api_samr_set_userinfo() to
prevent samr_io_userinfo_ctr() from returning on the first test (ctr ==
NULL).  I accomplished this by:

diff -urNx*CVS* /samba/orig/samba-2.2/source/rpc_server/srv_samr.c
rpc_server/srv_samr.c
--- /samba/orig/samba-2.2/source/rpc_server/srv_samr.c  Wed Feb 21 12:32:43
2001
+++ rpc_server/srv_samr.c     Fri Feb 23 14:52:07 2001
@@ -658,9 +658,12 @@
     SAMR_R_SET_USERINFO r_u;
     prs_struct *data = &p->in_data.data;
     prs_struct *rdata = &p->out_data.rdata;
+    SAM_USERINFO_CTR ctr;

     ZERO_STRUCT(q_u);
     ZERO_STRUCT(r_u);
+
+    q_u.ctr = &ctr;

     if (!samr_io_q_set_userinfo("", &q_u, data, 0)) {
          DEBUG(0,("api_samr_set_userinfo: Unable to unmarshall SAMR_Q_SET_USERINFO.\n"));


Then, the next problem I'm encountering is that on the SAMR_SET_USERINFO
api, we're expected 1 more byte than my Win2k box is sending.  Were
expecting, after the opnum (3A in this case):
POLICY_HANDLE (20 bytes);
switch (2 bytes)
ctr {
  switch (2 bytes)
  SAM_USER_INFO_24 {
    password (516 bytes)
    unknown (2 bytes)
  }
}

Totalling 542 bytes.

My RPC request from my W2k box (netmon agrees with this) is only 541 bytes.

Everthing up to the SAM_USER_INFO_24 looks good.  We fail trying to do a
prs_uint16 for the unknown field.  Only one byte is left.  If I change the
unknown field to 1 byte, and do a prs_uint8, I get beyond this problem.

That doesn't mean I make it all the way...getting a SEGV fault in
SamOEMhash, from inside _samr_set_userinfo...

Is this useful to anyone?  Can anyone point me where to go from here?

Jim


----------------------------
Jim McDonough
Linux Technology Center
IBM Boulder

Notes: Jim McDonough/Boulder/IBM @ IBMUS
VNET: JMCD at IBMUSM54
Internet: jmcd at us.ibm.com

Phone: (303) 924-5822
T/L: 263-5822





More information about the samba-technical mailing list