summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-09-25 09:35:45 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-09-25 09:35:45 +0000
commitd9a91a41441c156223760cb356fa997ea7bdbc1a (patch)
treedb32ec4d874129c3892d1ab02be89679f362be77
parenta3882a19254811ace2f9545580c14ce3bd588095 (diff)
downloadsamba-d9a91a41441c156223760cb356fa997ea7bdbc1a.tar.gz
If adding a user to ldap, make sure we have the 'account' structural class, or
else we can't add to OpenLDAP 2.1
-rw-r--r--source/passdb/pdb_ldap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/passdb/pdb_ldap.c b/source/passdb/pdb_ldap.c
index f82cb4488fc..6d38a2600d0 100644
--- a/source/passdb/pdb_ldap.c
+++ b/source/passdb/pdb_ldap.c
@@ -1590,6 +1590,7 @@ static BOOL ldapsam_add_sam_account(struct pdb_methods *my_methods, SAM_ACCOUNT
rc = ldap_modify_s(ldap_struct, dn, mods);
}
else {
+ make_a_mod(&mods, LDAP_MOD_ADD, "objectclass", "account");
rc = ldap_add_s(ldap_struct, dn, mods);
}