summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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