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

Call for change of ldapsearch results (ITS#484)

Full_Name: Even Holen
Version: 1.2.7 
OS: A lot...
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

When using the client tool ldapsearch, I've noticed that it always prints the
field. (The function is located in clients/tools/ldapsearch.c, the print_entry
functions and is like:
  if ( ldif ) {
        write_ldif_value( "dn", dn, strlen( dn ));
  } else {
        printf( "%s\n", dn );

In my opinion there should be an option not to display this field. An example to

prove my point: If I want to use ldapsearch to locate a mail-adress I need to
do something like: 
  ldapsearch -h somewhere -b "o=ntnu,c=no" -s sub "uid=evenh" mail | tail -1

And to make it even easier to do such a search I would suggest an option to
only the _values_. You've got an option for only attributes, but not for only
values.  In other words I would like my example to be something like:
 ldapsearch -N -V -h somewhere -b "o=ntnu,c=no" -s sub "uid=evenh" mail
which would return, say:   evenh+ldap@pvv.ntnu.no
instead of:
  uid=evenh, o=ntnu, c=no

The extra options are:
  -V   retrieve values only (no attribute names)
  -N   No display of dn-field

Even Holen