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

Re: can't modify or add uidNumber attribute



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