[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: slapcat vs. ldapsearch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tim Nelson wrote:
| Hi all. I've got a problem in that slapcat shows that there's a
| bucketload of info in ldap, but ldapsearch doesn't show much.
|
| For example, slapcat produces this information (among others) if I
| just run it with no parameters:
| --------------------------------
| # slapcat
| ...
| dn: cn=sync,ou=Rpc,dc=webalive,dc=biz
| objectClass: oncRpc
| objectClass: top
| description: RPC sync
| description: ONC RPC number 100104 (sync)
| oncRpcNumber: 100104
| cn: sync
| cn: na.sync
| ...
| --------------------------------
|
| If I do an ldapsearch, I don't seem to be able to get this
| information out:
|
| --------------------------------
| # ldapsearch -x -LLL -b '' -s base -D 'cn=sync,ou=Rpc,dc=webalive,dc=biz'
| dn:
| objectClass: top
| objectClass: OpenLDAProotDSE
| --------------------------------
|
| Question; is there something obvious I'm missing? eg. a command
| line option to ldapsearch?
Try:
# ldapsearch -x -LLL -b 'dc=webalive,dc=biz' -D
'cn=sync,ou=Rpc,dc=webalive,dc=biz' -W
I assume dc=webalive,dc=biz is the suffix defined in your slapd.conf,
and even though you are binding with a DN, you weren't providing a password.
Also, your search with ldapsearch may be subject to ACLs, limits (not
really an issue in this case though), and won't return operational
attributes. Assuming that cn=sync,ou=Rpc has a password you know, access
to all attributes and has no limits imposed, you need to run ldapsearch
like this to get output more representative of what you would get from
slapcat:
# ldapsearch -x -LLL -b 'dc=webalive,dc=biz' -s base -D
'cn=sync,ou=Rpc,dc=webalive,dc=biz' -W "*,+"
If you want more than just that entry:
# ldapsearch -x -LLL -b 'dc=webalive,dc=biz' -D
'cn=sync,ou=Rpc,dc=webalive,dc=biz' -W -z0 -l0 "*,+"
Maybe you should explain what you are trying to do, since your search
seems to be trying to do something very different to what you seem to
want (based on the slapcat snippet).
Regards,
Buchan
- --
Buchan Milne Senior Support Technician
Obsidian Systems http://www.obsidian.co.za
B.Eng RHCE (803004789010797)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB5iPRrJK6UGDSBKcRAhJJAKCAoq6jK5+RhXBRmZlYqjuefXIXaACglh42
KNM6KwAASQTD7xbM+Kb0O3Y=
=Pv34
-----END PGP SIGNATURE-----