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

Re: can't modify or add uidNumber attribute



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/26/2012 04:21 PM, stefano wrote:
> hi, i was modifying uidNumber attribute of a user but then has been
> standing for a few minutes and I stopped it:
> root@amahoro:~# ldapmodify -x -W -D 'cn=Manager,dc=amahoro,dc=bi'
> Enter LDAP Password:
> dn: uid=stefano,cn=Admins,dc=amahoro,dc=bi
> changetype: modify
> replace: uidNumber
> uidNumber: 1001
>
> modifying entry "uid=stefano,cn=Admins,dc=amahoro,dc=bi"

It has successfully performed the modification and was waiting for more
input, a Ctrl-D would have sufficed.

> .
> .
> .
> ctrl+c
>
> then with an ldapsearch for this user there was not the uidNumber attribute:
>
> dn: uid=stefano,cn=Admins,dc=amahoro,dc=bi
> uid: stefano
[...]
> userPassword:: e1NTSEF9b2pNOG1UT3NrT2ZVaDVyd1pUWUpSeWg3YXNxc1lXSHo=
> uidNumber: 1001
>

The uidnumber is right above, as the last line of the entry.

> trying to add it
>
> root@amahoro:~# ldapmodify -x -W -D 'cn=Manager,dc=amahoro,dc=bi'
> Enter LDAP Password:
> dn: uid=stefano,cn=Admins,dc=amahoro,dc=bi
> changetype: add
> add: uidNumber
> uidNumber: 1001
>
> adding new entry "uid=stefano,cn=Admins,dc=amahoro,dc=bi"
> ldap_add: Undefined attribute type (17)
>     additional info: add: attribute type undefined
>
> you can see the error message
> what is wrong?

Please read on the ldif format, either RFC 2849 or at least man 5 ldif.
With the above ldif you were trying to add an entry with attribute "add".

- --
Ondrej Kuznik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9whdkACgkQ9GWxeeH+cXtUbgCfU/QT76qgOdXYivbyvc2nEcyA
LNcAoI/Gn0NWwQ8Q3QBuDaGSj1sZUPxB
=bZXI
-----END PGP SIGNATURE-----

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you for understanding.