[CentOS] ldapsearch -f file doesn't work
Craig White
craigwhite at azapple.com
Wed Dec 2 13:09:45 UTC 2009
On Wed, 2009-12-02 at 06:06 -0700, Craig White wrote:
> I don't know because I haven't figured out how the 'f' option would be
> useful to me but I think the way you are trying to do it is clunky...
>
> #!/bin/sh
> #
> # usage - myldap-search user
> #
> LDAP_PASSWD="whatever"
> BINDDN="cn=Manager,dc=palermo,dc=edu"
> BASEDN="ou=people,dc=mydomain,dc=edu"
> for i in `cat users.txt` do;
> USER_PASSWD = ldapsearch -x\
> -w $LDAP_PASSWORD \
> -D $BINDDN \
> -b uid=$0","$BASEDN \
> legajo
> done
>
----
correction, the first one s/h/b
#!/bin/sh
#
# usage - myldap-search user
#
LDAP_PASSWD="whatever"
BINDDN="cn=Manager,dc=palermo,dc=edu"
BASEDN="ou=people,dc=mydomain,dc=edu"
ldapsearch -x\
-w $LDAP_PASSWORD \
-D $BINDDN \
-b uid=$0","$BASEDN \
legajo
Craig
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the CentOS
mailing list