# Filter for password lookups
#pass_filter = (&(objectClass=posixAccount)(uid=%u))
+
+# You can use same UID and GID for all user accounts if you really want to.
+# If the UID/GID is still found from LDAP reply, it overrides these values.
+#user_global_uid =
+#user_global_gid =
DEF(SET_STR, user_attrs),
DEF(SET_STR, user_filter),
DEF(SET_STR, pass_attrs),
- DEF(SET_STR, pass_filter)
+ DEF(SET_STR, pass_filter),
+ DEF(SET_STR, user_global_uid),
+ DEF(SET_STR, user_global_gid)
};
struct ldap_settings default_ldap_settings = {
MEMBER(user_attrs) NULL,
MEMBER(user_filter) NULL,
MEMBER(pass_attrs) NULL,
- MEMBER(pass_filter) NULL
+ MEMBER(pass_filter) NULL,
+ MEMBER(user_global_uid) 0,
+ MEMBER(user_global_gid) 0
};
static int ldap_conn_open(struct ldap_connection *conn);
const char *pass_attrs;
const char *pass_filter;
+ unsigned int user_global_uid;
+ unsigned int user_global_gid;
+
int ldap_deref, ldap_scope;
};
t_push();
memset(&user, 0, sizeof(user));
+ user.uid = conn->set.user_global_uid;
+ user.gid = conn->set.user_global_gid;
+
attr = ldap_first_attribute(conn->ld, entry, &ber);
while (attr != NULL) {
vals = ldap_get_values(conn->ld, entry, attr);