これを行うことにより、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 を使用して新しいユーザーを作成する方法の明確な例を提供するオンラインの場所を見つけることができません。