https://bugs.openldap.org/show_bug.cgi?id=9392
Issue ID: 9392 Summary: Duplicate emails and uid's allowed Product: OpenLDAP Version: unspecified Hardware: All OS: Linux Status: UNCONFIRMED Severity: normal Priority: --- Component: client tools Assignee: bugs@openldap.org Reporter: envykappa23@gmail.com Target Milestone: ---
If i try to add a user through ldapmyadmin i will get an error that the email/uid already exist.
If i use my java code , i can add users with existing emails or uid's just fine .
The email and uid should both be unique as those are what most people log in in external platforms that support SSO using LDAP.
Here is my code :
public void addUser(String user, String email, String pass) {
Attributes attributes = new BasicAttributes(); Attribute attribute = new BasicAttribute("objectClass"); attribute.add("inetOrgPerson");
attributes.put(attribute); attributes.put("mail", email); attributes.put("userPassword", pass); attributes.put("sn", "tempUsername"); attributes.put("uid",user);
connection.createSubcontext("cn=user,ou=groups,dc=demo,dc=com",attributes);
}
https://bugs.openldap.org/show_bug.cgi?id=9392
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Quanah Gibson-Mount quanah@openldap.org --- You've not shown anything that indicates the resulting entry on the LDAP server side has any duplicate values for a given entry. This ITS will be closed until you can show that there's an error on the OpenLDAP side of things.
https://bugs.openldap.org/show_bug.cgi?id=9392
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED
https://bugs.openldap.org/show_bug.cgi?id=9392
--- Comment #2 from envykappa23@gmail.com --- Hello again , here are two users i created via the java function i mentioned in my original message. They have unique CN but same email and uid.
https://prnt.sc/vj8rt2 https://prnt.sc/vj8rw7
Thanks for the quick reply.
https://bugs.openldap.org/show_bug.cgi?id=9392
--- Comment #3 from envykappa23@gmail.com --- This is on ldapmyadmin.
https://bugs.openldap.org/show_bug.cgi?id=9392
--- Comment #4 from Quanah Gibson-Mount quanah@openldap.org --- Those are different entries, there is no bug here. If you want to enforce uniqueness across entries, that is not a part of the LDAP standard and would require (with openldap) a correctly configured instance of the slapo-unique overlay.
https://bugs.openldap.org/show_bug.cgi?id=9392
--- Comment #5 from envykappa23@gmail.com --- So by ldap standards the same email address is allowed upon sign up ?
Do you know what do i need to configure , i searched google but didn't found much.
Would like to achieve unique email and uid .
Thanks for the help.
https://bugs.openldap.org/show_bug.cgi?id=9392
--- Comment #6 from Quanah Gibson-Mount quanah@openldap.org --- (In reply to envykappa23 from comment #5)
If you want help with how to set up and configure OpenLDAP, please email the openldap-technical email list:
https://lists.openldap.org/postorius/lists/openldap-technical.openldap.org/