All pastes #290562 Raw Edit

Mine

public text v1 · immutable
#290562 ·published 2006-12-24 03:29 UTC
rendered paste body
#!/bin/sh
# LDAP search at named institution

where=$1
#query=$2

shift

# sorted by name, which is the school's DNS name.
case $where in
    "case") serv=ldap.case.edu;         base="ou=People,o=cwru.edu,o=isp";;
    asu) serv=ds.asu.edu;               base="o=asu.edu";;
    baylor) serv=ldap.baylor.edu;       base="o=Baylor University,c=US";;


<!---------------------------lots more of this type of stuff-------------------------------->

    wwu) serv=ldap.ad.wwu.edu;          base="cn=Users,dc=univ,dc=dir,dc=wwu,dc=edu";
esac

#echo $serv $base
ldapsearch -x -h "$serv" -b "$base" $*