net-ldap의 rename
메서드를 사용하여 하나의 OU에서 다른 OU로 사용자를 이동합니다. 내가 만든 방법 여기Ruby NetLdap - Samba4에서 한 컨테이너에서 다른 컨테이너로 사용자 항목 이동
#<OpenStruct code=53, error_message="00002035: Unwilling to perform. Old RDN must be deleted", matched_dn="", message="Unwilling to perform">
것 : 그냥 RDN
(CN)를 변경하려고 할 때 같은 응답이 발생
def self.move(user, group)
new_rdn = "CN=#{user.cn.first}"
new_superior = "OU=#{group},OU=People,DC=example,DC=com"
ldap_connection.rename(
olddn: user.dn,
newrdn: new_rdn,
delete_attributes: true,
new_superior: new_superior
)
end
등을하지만, 나는 "올드 RDN은 삭제해야합니다"오류를 얻고있다 잘. 연결할 서버는 Samba4 서버입니다. 추가, 삭제, 업데이트 등은 모두 예상대로 작동합니다. 이름 바꾸기에만 문제가 있습니다.
이름 바꾸기/수정 _ 예를 주셔서 감사합니다. 이 방법은 어떤 이유로 든 net-ldap에 문서화되지 않았습니다. –