나는이 작업을 수행하여 LDAP를 사용하여 새 사용자를 생성하려고를 추가루비의 그물 - LDAP 사용자
require 'net/ldap'
ldap = Net::LDAP.new
ldap.host = 'ldap'
ldap.auth('uid=myuser,ou=users,dc=my,dc=domain,dc=com', 'mypass')
ldap.bind # this executes successfully, up to this point, all is well
dn = 'uid=newuser,ou=users,dc=my,dc=domain,dc=com'
attributes = { cn: 'newuser', sn: 'surname', objectclass: ['top', 'agent'] }
ldap.add(dn: dn, attributes: attributes)
ldap.get_operation_result
#=> #<OpenStruct code=21, message="unknown result (21)">
나는 LDAP에 새로운 오전, 나는 명확한 예를 제공하는 장소를 온라인으로 찾을 수 없습니다 net-ldap을 사용하여 새 사용자를 만드는 방법에 대한 정보.
을하는 데 도움이 : 당신은 "참고 MyUser는"새 사용자를 추가 할 수있는 충분한 액세스 권한이 있는지 확인 했? – Ralf
@Ralf, 예, 있습니다. –