Le 19/10/2011 15:51, Olivier Guillard a écrit :
Hi Seb,
Isn't there any way to pass filters to slapcat see spécific part of the configuration ?
ldapsearch -x -LLL -D uid=admin,cn=config -W -s sub -b "cn=config" "(olcDatabase=*)" olcAccess
[snip ...]
Unfortunately not. Slapcat is meant to dump the whole context. You can eventualy use a small perl script to sort the relevant nodes afterwards.
Else ldapsearch with '*' '+' should give you all the attributes included in the database.
ldapsearch -x -LLL -D uid=admin,cn=config -W -s sub -b "cn=config" "(olcDatabase=*)" '*' '+'
The '+' adds the operational attributes.
S. Bernard
Sébastien Bernard wrote:
Le 19/10/2011 15:51, Olivier Guillard a écrit :
Hi Seb,
Isn't there any way to pass filters to slapcat see spécific part of the configuration ?
Don't ask questions that are already answered in the manpages. RTFM.
See slapcat(8) option -a.
ldapsearch -x -LLL -D uid=admin,cn=config -W -s sub -b "cn=config" "(olcDatabase=*)" olcAccess
[snip ...]
Unfortunately not. Slapcat is meant to dump the whole context. You can eventualy use a small perl script to sort the relevant nodes afterwards.
Else ldapsearch with '*' '+' should give you all the attributes included in the database.
ldapsearch -x -LLL -D uid=admin,cn=config -W -s sub -b "cn=config" "(olcDatabase=*)" '*' '+'
The '+' adds the operational attributes.
S. Bernard
Le 19/10/2011 17:27, Howard Chu a écrit :
Sébastien Bernard wrote:
Le 19/10/2011 15:51, Olivier Guillard a écrit :
Hi Seb,
Isn't there any way to pass filters to slapcat see spécific part of the configuration ?
Don't ask questions that are already answered in the manpages. RTFM.
See slapcat(8) option -a.
Ok, I didn't know about slapcat -a. My mistake.
Hi Howard,
As said in a previous mail, I had seen the "-a" option in the manual that also says : "-a : Deprecated : use -H ldap:///???(filter) instead."
I however tried "-a" and I humbly admit that I have not been able to say : ' -s sub -b "cn=config" "(olcDatabase=*)" olcAccess ' using that option ( by the way, I tend to beleive that it is not feasable and that Sebastien was right at the end (-:
I also looked at the recommended "-H" option but :
- first, as I understand it "-H" can't be used if slapd doesn't run,
- Second, even with slapd runing, I have not been able with "-H" to say : -s sub -b "cn=config" "(olcDatabase=*)" olcAccess
I will survive without it to be honnest, but I just try to understand tools and to be clean.
--- Olivier
On Wed, Oct 19, 2011 at 5:27 PM, Howard Chu hyc@symas.com wrote:
Don't ask questions that are already answered in the manpages. RTFM.
See slapcat(8) option -a.
-- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
Olivier wrote:
Hi Howard,
As said in a previous mail, I had seen the "-a" option in the manual that also says : "-a : Deprecated : use -H ldap:///???(filter) instead."
I however tried "-a" and I humbly admit that I have not been able to say : ' -s sub -b "cn=config" "(olcDatabase=*)" olcAccess ' using that option ( by the way, I tend to beleive that it is not feasable and that Sebastien was right at the end (-:
I only answered your question about how to use a filter with slapcat. You cannot duplicate the effect of ldapsearch completely; you can't ask for just a specific list of attributes. slapcat always returns whole entries.
I also looked at the recommended "-H" option but :
- first, as I understand it "-H" can't be used if slapd doesn't run,
Where does any documentation say that? Where do you get these mistaken understandings from? Please point them out so the documents can be corrected.
slapcat reads the database files directly. Whether slapd is running or not is irrelevant.
- Second, even with slapd runing, I have not been able with "-H" to say : -s sub -b "cn=config" "(olcDatabase=*)" olcAccess
You haven't shown an example of the command you attempted, so we can't tell what you did wrong, but obviously you did it wrong. Go read RFC4516.
slapcat -H "ldap:///cn=config??sub?(olcDatabase=*)"
I will survive without it to be honnest, but I just try to understand tools and to be clean.
Olivier
On Wed, Oct 19, 2011 at 5:27 PM, Howard Chuhyc@symas.com wrote:
Don't ask questions that are already answered in the manpages. RTFM.
See slapcat(8) option -a.
openldap-technical@openldap.org