diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-07-30 10:30:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:01:23 -0500 |
commit | 008b84076094733d7754c524923b1d96ab30b825 (patch) | |
tree | da486ea5288b95b86c3114106db596f00d70b99f /source4/rpc_server | |
parent | 63c20026c4c27beffbcdb962da7bd844c2ed9c97 (diff) | |
download | samba-008b84076094733d7754c524923b1d96ab30b825.tar.gz samba-008b84076094733d7754c524923b1d96ab30b825.tar.bz2 samba-008b84076094733d7754c524923b1d96ab30b825.zip |
r24080: Set the primary group (matching windows) when creating new users in
SAMR. This can't be done in the ldb templates code, as it doesn't
happen over direct LDAP.
As noted in bug #4829.
Andrew Bartlett
(This used to be commit 3bfa6dbf7ded06df78310f7bd39d8a8d4edbb4ef)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 648b0d37c6..9bb9cb8161 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -1269,6 +1269,7 @@ static NTSTATUS dcesrv_samr_CreateUser2(struct dcesrv_call_state *dce_call, TALL cn_name[cn_name_len - 1] = '\0'; container = "CN=Computers"; obj_class = "computer"; + samdb_msg_add_int(d_state->sam_ctx, mem_ctx, msg, "primaryGroupID", DOMAIN_RID_DOMAIN_MEMBERS); } else if (r->in.acct_flags == ACB_SVRTRUST) { if (cn_name[cn_name_len - 1] != '$') { @@ -1277,6 +1278,7 @@ static NTSTATUS dcesrv_samr_CreateUser2(struct dcesrv_call_state *dce_call, TALL cn_name[cn_name_len - 1] = '\0'; container = "OU=Domain Controllers"; obj_class = "computer"; + samdb_msg_add_int(d_state->sam_ctx, mem_ctx, msg, "primaryGroupID", DOMAIN_RID_DCS); } else if (r->in.acct_flags == ACB_DOMTRUST) { container = "CN=Users"; |