summaryrefslogtreecommitdiffstats
path: root/source/libads/ldap_user.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2005-12-21 10:05:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:55 -0500
commitfd5da5875cdc47fc6ef6ba1615a9635f9f157589 (patch)
tree3ee8db0eeda095064913b637020f5b5606dd5b19 /source/libads/ldap_user.c
parentaeff7e3e180b3d8a79a1f90f7458ba85a670a451 (diff)
downloadsamba-fd5da5875cdc47fc6ef6ba1615a9635f9f157589.tar.gz
samba-fd5da5875cdc47fc6ef6ba1615a9635f9f157589.tar.xz
samba-fd5da5875cdc47fc6ef6ba1615a9635f9f157589.zip
r12406: Since w2k3 sp1 we fail to create user accounts using e.g. "net ads user
add" with "Server is unwilling to perform". Seems we have to put in the same userAccountControl bits the server would pick when we wouldn't send them at all. Guenther
Diffstat (limited to 'source/libads/ldap_user.c')
-rw-r--r--source/libads/ldap_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/libads/ldap_user.c b/source/libads/ldap_user.c
index 56a0d8013b2..3ff6acc9e83 100644
--- a/source/libads/ldap_user.c
+++ b/source/libads/ldap_user.c
@@ -65,7 +65,7 @@ ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user,
if (!(new_dn = talloc_asprintf(ctx, "cn=%s,%s,%s", name, container,
ads->config.bind_path)))
goto done;
- if (!(controlstr = talloc_asprintf(ctx, "%u", UF_NORMAL_ACCOUNT)))
+ if (!(controlstr = talloc_asprintf(ctx, "%u", (UF_NORMAL_ACCOUNT | UF_ACCOUNTDISABLE))))
goto done;
if (!(mods = ads_init_mods(ctx)))
goto done;