[patch samba_2_2] LDAP_MOD_ADD structural

Ignacio Coupeau icoupeau at unav.es
Wed Aug 14 01:27:00 GMT 2002

A possible patch to add a new account "smbpasswd -a <new_user>" in the 
ldap. As the ldap v3 (openldap 2.1.3) requires a structural object, the 
patch provides "objectclass: account", as Luke Howard sugest in the list:

 >In the case where there is no existing entry, then SAMBA should
 >probably use the "account" structural object class which only
 >requires the "uid" attribute. See section 5.3 of RFC 2307.

The "account" object don't require any aditional attribute.

The patch:
diff -u passdb/pdb_ldap.c passdb/pdb_ldap.c-DIST-020705
--- passdb/pdb_ldap.c   Wed Aug 14 20:02:42 2002
+++ passdb/pdb_ldap.c-DIST-020705       Fri Jul  5 14:54:32 2002
@@ -1104,7 +1104,6 @@
         if (ldap_op == LDAP_MOD_REPLACE) {
                 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);
Ignacio Coupeau, Ph.D.     e-mail: icoupeau at unav.es
CTI, Director              fax:    948 425619
University of Navarra      voice:  948 425600
Pamplona, SPAIN            http://www.unav.es/cti/

More information about the samba-technical mailing list