Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   ldapsearch -f file doesn't work (http://www.linux-archive.org/centos/289296-ldapsearch-f-file-doesnt-work.html)

Sergio Belkin 12-02-2009 11:42 AM

ldapsearch -f file doesn't work
 
Hi,

Firstly, system info:

Linux mysystem 2.6.18-53.1.4.el5 #1 SMP Fri Nov 30 00:45:55 EST 2007
x86_64 x86_64 x86_64 GNU/Linux


I am running ldap on Centos with packages openldap-2.3.27-8.el5_2.4 y
openldap-2.3.27-8.el5_2.4
I'd want to perform a query that return one attribute. So I did
something as follows:


ldapsearch -W -f qbis.ldif -D "cn=Manager,dc=palermo,dc=edu" -b
"ou=people,dc=mydomain,dc=edu" -x legajo

(Where legajo is the filter)

There is no problem with filter but wih the file "qbis.ldif" which contains:


dn: uid=jdoe,ou=people,dc=mydomain,dc=edu


Of course I could perform that query with no need of one file, but I
need to get "legajo" from around 800 users so it would be nice to be
able to use "-f file". I cannot do something like a "loop for" because
it would ask me every time the Manager password.

Am I doing something wrong or is a ldap bug?

Thanks in advance!
--
--
Open Kairos http://www.openkairos.com
Watch More TV http://sebelk.blogspot.com
Sergio Belkin -
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Sergio Belkin 12-02-2009 11:48 AM

ldapsearch -f file doesn't work
 
2009/12/2 Sergio Belkin <sebelk@gmail.com>:
> Hi,
>
> Firstly, system info:
>
> Linux mysystem 2.6.18-53.1.4.el5 #1 SMP Fri Nov 30 00:45:55 EST 2007
> x86_64 x86_64 x86_64 GNU/Linux
>
>
> I am running ldap on Centos with packages openldap-2.3.27-8.el5_2.4 y
> openldap-2.3.27-8.el5_2.4
> I'd want to perform a query that return one attribute. So I did
> something as follows:
>
>
> ldapsearch -W *-f qbis.ldif -D "cn=Manager,dc=palermo,dc=edu" -b
> "ou=people,dc=mydomain,dc=edu" -x *legajo
>
> (Where legajo is the filter)
>
> There is no problem with filter but wih the file "qbis.ldif" which contains:
>
>
> dn: uid=jdoe,ou=people,dc=mydomain,dc=edu
>
>
> Of course I could perform that query with no need of one file, but I
> need to get "legajo" from around 800 users so it would be nice to be
> able to use "-f file". I cannot do something like a "loop for" because
> it would ask me every time the Manager password.
>
> Am I doing something wrong or is a ldap bug?
>
> Thanks in advance!
> --

Ouch, I forget to comment what is the problem, well the problem is
that query returns all database entries (onlt it works the filter) but
doesn't honor "-f file" at all. So that was my question, what's wrong
with that option?

Thanks in advance again :)



--
--
Open Kairos http://www.openkairos.com
Watch More TV http://sebelk.blogspot.com
Sergio Belkin -
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 03:11 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.