summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-07-10 13:26:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:59:22 -0500
commit1cc770fc588b86b5162689c7acdafa05b745f059 (patch)
tree7774be7824151233a7261a9b80c698e469f6bbe4 /source4
parent8f9922863f5c50037ceb9614a57b858be70a9bd0 (diff)
downloadsamba-1cc770fc588b86b5162689c7acdafa05b745f059.tar.gz
samba-1cc770fc588b86b5162689c7acdafa05b745f059.tar.bz2
samba-1cc770fc588b86b5162689c7acdafa05b745f059.zip
r23815: Thanks to Matthias Wallnoefer <mwallnoefer@yahoo.de> for pointing out
that we had the wrong objectClass for OU=Domain Controllers,${DOMAINDN} (was CN=Domain Controllers,${DOMAINDN}) This fixes both the SAMR server and the LDIF templates. Andrew Bartlett (This used to be commit 625a9e6c041bedc93925bdebb3a60af1dbdde317)
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c10
-rw-r--r--source4/setup/provision.ldif4
-rw-r--r--source4/setup/provision_self_join.ldif2
3 files changed, 8 insertions, 8 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index cb82ad3ec8..b1b9e9288e 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -1236,7 +1236,7 @@ static NTSTATUS dcesrv_samr_CreateUser2(struct dcesrv_call_state *dce_call, TALL
/* This must be one of these values *only* */
if (r->in.acct_flags == ACB_NORMAL) {
- container = "Users";
+ container = "CN=Users";
obj_class = "user";
} else if (r->in.acct_flags == ACB_WSTRUST) {
@@ -1244,7 +1244,7 @@ static NTSTATUS dcesrv_samr_CreateUser2(struct dcesrv_call_state *dce_call, TALL
return NT_STATUS_FOOBAR;
}
cn_name[cn_name_len - 1] = '\0';
- container = "Computers";
+ container = "CN=Computers";
obj_class = "computer";
} else if (r->in.acct_flags == ACB_SVRTRUST) {
@@ -1252,11 +1252,11 @@ static NTSTATUS dcesrv_samr_CreateUser2(struct dcesrv_call_state *dce_call, TALL
return NT_STATUS_FOOBAR;
}
cn_name[cn_name_len - 1] = '\0';
- container = "Domain Controllers";
+ container = "OU=Domain Controllers";
obj_class = "computer";
} else if (r->in.acct_flags == ACB_DOMTRUST) {
- container = "Users";
+ container = "CN=Users";
obj_class = "user";
} else {
@@ -1266,7 +1266,7 @@ static NTSTATUS dcesrv_samr_CreateUser2(struct dcesrv_call_state *dce_call, TALL
/* add core elements to the ldb_message for the user */
msg->dn = ldb_dn_copy(mem_ctx, d_state->domain_dn);
- if ( ! ldb_dn_add_child_fmt(msg->dn, "CN=%s,CN=%s", cn_name, container)) {
+ if ( ! ldb_dn_add_child_fmt(msg->dn, "CN=%s,%s", cn_name, container)) {
ldb_transaction_cancel(d_state->sam_ctx);
return NT_STATUS_FOOBAR;
}
diff --git a/source4/setup/provision.ldif b/source4/setup/provision.ldif
index 49f87d8cbc..e44a4642b2 100644
--- a/source4/setup/provision.ldif
+++ b/source4/setup/provision.ldif
@@ -1,6 +1,6 @@
-dn: CN=Domain Controllers,${DOMAINDN}
+dn: OU=Domain Controllers,${DOMAINDN}
objectClass: top
-objectClass: container
+objectClass: organizationalUnit
cn: Domain Controllers
description: Default container for domain controllers
instanceType: 4
diff --git a/source4/setup/provision_self_join.ldif b/source4/setup/provision_self_join.ldif
index 5ebc87b106..25f9fab6d3 100644
--- a/source4/setup/provision_self_join.ldif
+++ b/source4/setup/provision_self_join.ldif
@@ -1,6 +1,6 @@
#Join the DC to itself by default
-dn: CN=${NETBIOSNAME},CN=Domain Controllers,${DOMAINDN}
+dn: CN=${NETBIOSNAME},OU=Domain Controllers,${DOMAINDN}
objectClass: computer
cn: ${NETBIOSNAME}
userAccountControl: 532480