From 568e8003bc48ec18118358b98c2d1131efd6ff45 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 21 Dec 2005 10:05:39 +0000 Subject: 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 (This used to be commit fd5da5875cdc47fc6ef6ba1615a9635f9f157589) --- source3/libads/ldap_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libads/ldap_user.c') diff --git a/source3/libads/ldap_user.c b/source3/libads/ldap_user.c index 56a0d8013b..3ff6acc9e8 100644 --- a/source3/libads/ldap_user.c +++ b/source3/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; -- cgit