[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Auto increment (uidNext and uidNumber)



Thank you! This also works (with a minor change):

This is the LDIF that I use:

--- increment.ldif -------------------------------

dn: cn=uidNext,dc=example,dc=com
changetype: modify
increment:uidNumber
uidNumber: 1
-

---- EOF ------------------------------------------


Pablo.

On 12/21/2011 10:27 AM, Andrey Konovalov wrote:
According to http://tools.ietf.org/html/rfc4525
Yo can do simply this (with ldapmodify)

dn: cn=uidNext,dc=example,dc=com
changetype: modify
increment: uidNumber



On 12/21/2011 04:37 PM, Pablo wrote:
Hello,

Based on this article: http://www.rexconsulting.net/ldap-protocol-uidNumber.html. I am trying to increment 'uidNumber'. For doing that, I am using this LDIF file:

--------------- autoinc.ldif ---------------------------

dn: cn=uidNext,dc=example,dc=com
changetype: modify
delete:uidNumber
uidNumber: 610
-
add: uidNumber
uidNumber: 611

------------------- EOF --------------------------------

And this command; but produce an error:

$ ldapadd -x -D "cn=Admin,dc=example,dc=com" -wsecret -f ./autoinc.ldif

adding new entry "cn=uidNext,dc=example,dc=com"
ldapadd: Undefined attribute type (17)
    additional info: add: attribute type undefined

$


This is the definition of the uidNext objectClass:

----------------------------------------------
objectClass ( 1.3.6.1.4.1.4203.666.599
    NAME 'uidNext'
    SUP top STRUCTURAL
    MUST ( cn $ uidNumber ) )
----------------------------------------------

Any idea of what I am doing wrong here?

Thanks in advance.
Pablo.