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: [email protected]
          Reporter: [email protected]
  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);




    }

-- 
You are receiving this mail because:
You are on the CC list for the issue.

Reply via email to