By: Guy Resmini user 05 Oct 2016 at 4:32 a.m. CDT

2 Responses
Guy Resmini gravatar
Gluu Server version 2.4.4 on Ubuntu 16.04 TLS. => Without OpenLDAP => With OpenDJ only Hello, I'm trying to create new users into OpenDJ. And to manage people and groups... I'm able to communicate with OpenDJ and to query it thanks to PHP (ldap functions). I'm able to add users in OpenDJ thanks to PHP (ldap functions), with cn, sn, mail... But new users didn't appear in Gluu's User Management interface. I think the problem is that : - my new user has not INUM. - my new user has a wrong dn Am I right ? So i wanted to generate INUM thanks to your API. I tried to use the "ID Generation API Document" to generate those INUMs, but i have an error when I try to access : https://localhost:1636/id/0000/people/ 0‚{�x‚t �‚SCannot decode the provided ASN.1 sequence as an LDAP message because the first element of the sequence could not be decoded as an integer message ID: org.forgerock.opendj.ldap.DecodeException: Cannot decode the provided ASN.1 integer element because the length of the element value was not between one and four bytes (actual length was 32)Š1.3.6.1.4.1.1466.20036 Am I wrong ? Any idea ? Thanks, Guy

By Guy Resmini user 05 Oct 2016 at 4:34 a.m. CDT

Guy Resmini gravatar
With curl : ``` curl -k -v "https://localhost:1636/id/0000/people" * Trying ::1... * Connected to localhost (::1) port 1636 (#0) * found 173 certificates in /etc/ssl/certs/ca-certificates.crt * found 694 certificates in /etc/ssl/certs * ALPN, offering http/1.1 * SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256 * server certificate verification SKIPPED * server certificate status verification SKIPPED * common name: localhost (matched) * server certificate expiration date OK * server certificate activation date OK * certificate public key: RSA * certificate version: #3 * subject: O=OpenDJ RSA Self-Signed Certificate,CN=localhost * start date: Wed, 31 Aug 2016 08:41:25 GMT * expire date: Tue, 26 Aug 2036 08:41:25 GMT * issuer: O=OpenDJ RSA Self-Signed Certificate,CN=localhost * compression: NULL * ALPN, server did not agree to a protocol > GET /id/0000/people HTTP/1.1 > Host: localhost:1636 > User-Agent: curl/7.47.0 > Accept: */* > 0▒{x▒t * GnuTLS recv error (-110): The TLS connection was non-properly terminated. * Closing connection 0 curl: (56) GnuTLS recv error (-110): The TLS connection was non-properly terminated. ▒SCannot decode the provided ASN.1 sequence as an LDAP message because the first element of the sequence could not be decoded as an integer message ID: org.forgerock.opendj.ldap.DecodeException: Cannot decode the provided ASN.1 integer element because the length of the element value was not between one and four bytes (actual length was 32)▒1.3.6.1.4.1.1466.20036 ```

By Michael Schwartz Account Admin 05 Oct 2016 at 1:03 p.m. CDT

Michael Schwartz gravatar
If you want a shortcut, you can use the inum up to `0000!xxxx.xxxx` and replace the x's with a unique hex number. It has to be unique, so you may want to search ldap for an existing inum, or create a file with all the existing person inums. If you're doing this a lot, you should check out the SCIM API. Adding users directly via LDAP can lead to errors, especially in the long term.