[Date Prev][Date Next]
Re: some quick questions.
Quoting "Qianfeng" <firstname.lastname@example.org>:
> 1. how do i know how many entries there are in the LDAP database?
You count them :) Kidding aside, to be 100% sure how many, use slapcat,
grepping for '^dn: '. Make sure slapd is turned of/shutdown (I've heard
'rumors' that this isn't necessary on later 2.1 slapd's).
> i noticed that there is a "numEntries:1" when i use ldapsearch
> command. is it the number?
No, this is the number of objects returned from the search. The thing
is, there's usually a limit on how many objects you CAN retreive (I think
the default is a maximum of 500, but this can be changed in slapd.conf).
> 2. how do i add more entries when i have added the first one? seems
> that ldapadd returns nothing.
Do you mean 'adding attributes to an already existing object' or 'adding
a new object'? The first is 'with a modify' (man ldapmodify).
> 3. how do i delete the entries i have added? i am a bit confused
> about the "ldapdelet" command.
[papadoc.pts/10]$ ldapsearch -LLL -x uid=turbo dn
[papadoc.pts/10]$ ldapdelete uid=turbo,ou=People,dc=fredriksson,dc=com
(I'm not going to try this, I don't want to shoot myself in the foot/head :)