[GH-ISSUE #457] Need support for ldapadd #174

Closed
opened 2026-02-27 08:15:40 +03:00 by kerem · 2 comments
Owner

Originally created by @Evantage-WS on GitHub (Feb 20, 2023).
Original GitHub issue: https://github.com/lldap/lldap/issues/457

Hi,

With ldapsearch I can search the LDAP server, but when using ldapadd, I do get an error:

adding new entry "uid=test,ou=people,dc=example,dc=com"
ldap_add: Server is unwilling to perform (53)
        additional info: Unsupported operation: AddRequest(
    LdapAddRequest {
        dn: "uid=test,ou=people,dc=example,dc=com",
        attributes: [
            LdapPartialAttribute {
                atype: "cn",
                vals: [
                    [
                        87,
                        105,
                        108,
                        99,
                        111,
                        32,
                        118,
                        97,
                        110,
                        32,
                        100,
                        101,
                        114,
                        32,
                        83,
                        116,
                        101,
                        107,
                    ],
                ],
            },
            LdapPartialAttribute {
                atype: "sn",
                vals: [
                    [
                        118,
                        97,
                        110,
                        32,
                        100,
                        101,
                        114,
                        32,
                        83,
                        116,
                        101,
                        107,
                    ],
                ],
            },
            LdapPartialAttribute {
                atype: "userPassword",
                vals: [
                    "********",
                ],
            },
            LdapPartialAttribute {
                atype: "objectClass",
                vals: [
                    [
                        105,
                        110,
                        101,
                        116,
                        79,
                        114,
                        103,
                        80,
                        101,
                        114,
                        115,
                        111,
                        110,
                    ],
                ],
            },
        ],
    },
)

ldapadd command:

ldapadd -x -H ldap://lldap-service:3890 \
      -D uid=admin,ou=people,dc=example,dc=com \
      -w admin \
      -f /tmp/lldap.lpif

Contents of lldap.lpif

    dn: uid=test,ou=people,dc=example,dc=com
    cn: Test User
    sn: User
    givenName: Test
    uid: testuser
    userPassword:: e1NTSEF9L0NMVEhXSVRjUlVPTzM5NjFERXkvMHM3SFRpNUVpVlo=
    objectClass: inetOrgPerson

Any idea if this is a problem in my command or is lldap something missing for supporting ldapadd? (and ldapdelete)

Maybe there is another way to add users via a script?

Thanks

Originally created by @Evantage-WS on GitHub (Feb 20, 2023). Original GitHub issue: https://github.com/lldap/lldap/issues/457 Hi, With ldapsearch I can search the LDAP server, but when using ldapadd, I do get an error: ``` adding new entry "uid=test,ou=people,dc=example,dc=com" ldap_add: Server is unwilling to perform (53) additional info: Unsupported operation: AddRequest( LdapAddRequest { dn: "uid=test,ou=people,dc=example,dc=com", attributes: [ LdapPartialAttribute { atype: "cn", vals: [ [ 87, 105, 108, 99, 111, 32, 118, 97, 110, 32, 100, 101, 114, 32, 83, 116, 101, 107, ], ], }, LdapPartialAttribute { atype: "sn", vals: [ [ 118, 97, 110, 32, 100, 101, 114, 32, 83, 116, 101, 107, ], ], }, LdapPartialAttribute { atype: "userPassword", vals: [ "********", ], }, LdapPartialAttribute { atype: "objectClass", vals: [ [ 105, 110, 101, 116, 79, 114, 103, 80, 101, 114, 115, 111, 110, ], ], }, ], }, ) ``` ldapadd command: ``` ldapadd -x -H ldap://lldap-service:3890 \ -D uid=admin,ou=people,dc=example,dc=com \ -w admin \ -f /tmp/lldap.lpif ``` Contents of lldap.lpif ``` dn: uid=test,ou=people,dc=example,dc=com cn: Test User sn: User givenName: Test uid: testuser userPassword:: e1NTSEF9L0NMVEhXSVRjUlVPTzM5NjFERXkvMHM3SFRpNUVpVlo= objectClass: inetOrgPerson ``` Any idea if this is a problem in my command or is lldap something missing for supporting ldapadd? (and ldapdelete) Maybe there is another way to add users via a script? Thanks
kerem closed this issue 2026-02-27 08:15:40 +03:00
Author
Owner

@nitnelave commented on GitHub (Feb 20, 2023):

Hi,

Yes, full support for the LDAP protocol is not the goal, in particular the editing parts of the protocol. The main API to add/edit/delete users is GraphQL. You can either use the web frontend for manual actions, or use any graphql library in any language to script it (see the schema at the root: graphql.schema).

You'll need to get a token to authenticate. I need to add some more docs for that, but in the meantime check this issue: https://github.com/nitnelave/lldap/issues/375

Cheers!

<!-- gh-comment-id:1436827288 --> @nitnelave commented on GitHub (Feb 20, 2023): Hi, Yes, full support for the LDAP protocol is not the goal, in particular the editing parts of the protocol. The main API to add/edit/delete users is GraphQL. You can either use the web frontend for manual actions, or use any graphql library in any language to script it (see the schema at the root: graphql.schema). You'll need to get a token to authenticate. I need to add some more docs for that, but in the meantime check this issue: https://github.com/nitnelave/lldap/issues/375 Cheers!
Author
Owner

@Evantage-WS commented on GitHub (Feb 20, 2023):

Thanks

<!-- gh-comment-id:1436912081 --> @Evantage-WS commented on GitHub (Feb 20, 2023): Thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#174
No description provided.