--- bin/ldap.pl 2008/03/13 13:12:46 7 +++ bin/ldap.pl 2008/03/13 13:49:41 8 @@ -11,17 +11,23 @@ BEGIN { Jifty->new; }; -my $ldap = Net::LDAP->new( 'ldap1.skole.local' ) or die "$@"; +#warn "# config->app(LDAP) = ",dump( Jifty->config->app('LDAP') ); + +my $ldap = Net::LDAP->new( Jifty->config->app('LDAP')->{Server} ) or die "$@"; # an anonymous bind -my $mesg = $ldap->bind; +#my $mesg = $ldap->bind; +my $mesg = $ldap->bind( + DN => Jifty->config->app('LDAP')->{DN}, + password => Jifty->config->app('LDAP')->{Password}, +); # perform a search $mesg = $ldap->search( base => "dc=skole,dc=hr", # filter => "(&(sn=Barr) (o=Texas Instruments))", filter => "(objectClass=hrEduPerson)", - sizelimit => 100, # off + sizelimit => 3, # 0 = off ); if ( $mesg->code ) {