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" . . . 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 cn: Stefano Malini sn: Malini gidNumber: 1000 homeDirectory: /home/Admins/stefano mail: stefano.malini@gmail.com objectClass: inetOrgPerson objectClass: top objectClass: posixAccount objectClass: shadowAccount userPassword:: e1NTSEF9b2pNOG1UT3NrT2ZVaDVyd1pUWUpSeWg3YXNxc1lXSHo= uidNumber: 1001
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?
-----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
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.
yes, i've seen it.
but now i can't use also ldapsearch, please take a look of syslog:
Mar 26 16:11:33 amahoro slapd[1603]: @(#) $OpenLDAP: slapd 2.4.23 (Jun 16 2011 02:53:39) $#012#011buildd@murphy:/build/buildd-openldap_2.4.23-7.2-i386-Y1mwvF/openldap-2.4.23/debian/build/servers/slapd Mar 26 16:11:33 amahoro slapd[1604]: hdb_db_open: database "dc=amahoro,dc=bi" cannot be opened, err 13. Restore from backup! Mar 26 16:11:33 amahoro slapd[1604]: bdb(dc=amahoro,dc=bi): txn_checkpoint interface requires an environment configured for the transaction subsystem Mar 26 16:11:33 amahoro slapd[1604]: bdb_db_close: database "dc=amahoro,dc=bi": txn_checkpoint failed: Invalid argument (22). Mar 26 16:11:33 amahoro slapd[1604]: backend_startup_one (type=hdb, suffix="dc=amahoro,dc=bi"): bi_db_open failed! (13) Mar 26 16:11:33 amahoro slapd[1604]: bdb_db_close: database "dc=amahoro,dc=bi": alock_close failed Mar 26 16:11:33 amahoro slapd[1604]: slapd stopped.
i don't understand this error type
On 03/26/2012 05:06 PM, Ondrej Kuznik wrote:
-----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.
On Monday, 26 March 2012 16:21:17 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 was waiting for more input ....
. ctrl+c
CTRL-D is technically the right input here to let this ldapmodify complete.
then with an ldapsearch for this user there was not the uidNumber attribute:
It seems to be here:
dn: uid=stefano,cn=Admins,dc=amahoro,dc=bi
[...
uidNumber: 1001
I note of course, that if you are using standard schema, it is impossible to have the posixAccount objectClass without a uidNumber attribute.
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?
Your LDIF is incorrect, you asked for a changetype of 'add' (the equivalent of calling ldapadd instead of ldapmodify). This would have been correct if you had no existing uidNumber attribute:
dn: uid=stefano,cn=Admins,dc=amahoro,dc=bi add: uidNumber uidNumber: 1001
At least it should have given you a better error message (that the attribute already exists).
Regards, Buchan
thank you, i understand my error. now i have this problem. trying an ldapsearch is not possible to contact LDAP server.
this is the output in syslog:
Mar 26 16:11:33 amahoro slapd[1603]: @(#) $OpenLDAP: slapd 2.4.23 (Jun 16 2011 02:53:39) $#012#011buildd@murphy:/build/buildd-openldap_2.4.23-7.2-i386-Y1mwvF/openldap-2.4.23/debian/build/servers/slapd Mar 26 16:11:33 amahoro slapd[1604]: hdb_db_open: database "dc=amahoro,dc=bi" cannot be opened, err 13. Restore from backup! Mar 26 16:11:33 amahoro slapd[1604]: bdb(dc=amahoro,dc=bi): txn_checkpoint interface requires an environment configured for the transaction subsystem Mar 26 16:11:33 amahoro slapd[1604]: bdb_db_close: database "dc=amahoro,dc=bi": txn_checkpoint failed: Invalid argument (22). Mar 26 16:11:33 amahoro slapd[1604]: backend_startup_one (type=hdb, suffix="dc=amahoro,dc=bi"): bi_db_open failed! (13) Mar 26 16:11:33 amahoro slapd[1604]: bdb_db_close: database "dc=amahoro,dc=bi": alock_close failed Mar 26 16:11:33 amahoro slapd[1604]: slapd stopped.
could you help me please?
On 03/26/2012 05:31 PM, Buchan Milne wrote:
On Monday, 26 March 2012 16:21:17 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 was waiting for more input ....
. ctrl+c
CTRL-D is technically the right input here to let this ldapmodify complete.
then with an ldapsearch for this user there was not the uidNumber attribute:
It seems to be here:
dn: uid=stefano,cn=Admins,dc=amahoro,dc=bi
[...
uidNumber: 1001
I note of course, that if you are using standard schema, it is impossible to have the posixAccount objectClass without a uidNumber attribute.
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?
Your LDIF is incorrect, you asked for a changetype of 'add' (the equivalent of calling ldapadd instead of ldapmodify). This would have been correct if you had no existing uidNumber attribute:
dn: uid=stefano,cn=Admins,dc=amahoro,dc=bi add: uidNumber uidNumber: 1001
At least it should have given you a better error message (that the attribute already exists).
Regards, Buchan
Hi ,
You mention that "then with an ldapsearch for this user there was not the uidNumber attribute:" . Isn't the attribute and its value listed here "uidNumber: 1001" . You will get ": Undefined attribute type (17)" if you try to add it to an entry that already has this attribute value populated.
Not sure why your ldapmodify is hanging though.
Simon.
From: openldap-technical-bounces@OpenLDAP.org [mailto:openldap-technical-bounces@OpenLDAP.org] On Behalf Of stefano Sent: 26 March 2012 15:21 To: openldap-technical@openldap.org Subject: can't modify or add uidNumber attribute
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" . . . 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 cn: Stefano Malini sn: Malini gidNumber: 1000 homeDirectory: /home/Admins/stefano mail: stefano.malini@gmail.com objectClass: inetOrgPerson objectClass: top objectClass: posixAccount objectClass: shadowAccount userPassword:: e1NTSEF9b2pNOG1UT3NrT2ZVaDVyd1pUWUpSeWg3YXNxc1lXSHo= uidNumber: 1001
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?
This e-mail has been scanned for viruses by the Cable&Wireless Worldwide e-mail security system. For more information on a proactive managed e-mail secure service, visit http://www.cw.com/managed-exchange
The information contained in this e-mail is confidential and may also be subject to legal privilege. It is intended only for the recipient(s) named above. If you are not named above as a recipient, you must not read, copy, disclose, forward or otherwise use the information contained in this email. If you have received this e-mail in error, please notify the sender (whose contact details are above) immediately by reply e-mail and delete the message and any attachments without retaining any copies.
Cable & Wireless Worldwide plc Registered in England and Wales. Company Number 07029206 Registered office: Waterside House, Longshot Lane, Bracknell, Berkshire, RG12 1XL, England
openldap-technical@openldap.org