Spring LDAPTemplate을 사용하여 OpenLDAP를 제어하려고합니다.봄 LdapTemplate - 특성 'gidNumber'예외 허용되지 않음
LDAP에서 그룹 및 사용자 조직 단위가 있습니다. 그룹 연결을 사용하여 LDAP에 새 사용자를 바인딩하려고합니다. (일반 사용자 계정) 그래서 새로운 사용자를 바인드하려고 할 때 gidNumber
attiribute를 속성 오브젝트에 넣습니다. 하지만이 같은 오류 받고 있어요 : 여기
[LDAP: error code 65 - attribute 'gidNumber' not allowed]; nested exception is javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - attribute 'gidNumber' not allowed]; remaining name 'ou=staff'
것은 지금까지 시도한 작업은 다음과 같습니다
여기DistinguishedName dn = new DistinguishedName();
dn.add("ou", "staff");
Attributes attributes = new BasicAttributes();
attributes.put("objectClass", "inetOrgPerson");
attributes.put("uid", username);
attributes.put("givenName", name);
attributes.put("gidNumber", gidNumber.toString());
attributes.put("sn", surname);
attributes.put("cn", name + " " + surname);
attributes.put("userPassword", password);
ldapTemplate.bind(dn, null, attributes);
내 스키마입니다 :
+--> dc=ibu,dc=edu,dc=tr (5)
---> cn=admin
+--> ou=group (1)
| ---> cn=Academic
---> ou=guest
+--> ou=staff (2)
| ---> cn=John Clark
---> ou=student
답장을 보내 주셔서 감사합니다. 하지만 이제는 또 다른 예외가 생깁니다 : 'LDAP : 오류 코드 65 - 구조적 객체 클래스가 제공되지 않았습니다.' – talha06