[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/usr/share/se3/sbin/ -> getUserProfileInfo.pl (source)

   1  #!/usr/bin/perl
   2  
   3  use Net::LDAP;
   4  require '/etc/SeConfig.ph';
   5  
   6  die("Erreur d'argument.\n") if ($#ARGV != 0);
   7  $uid = shift @ARGV;
   8  
   9  $dn = 'uid=' . $uid . ',' . $peopleDn;
  10  $uid =~ /^(\w*)\.(\w*)$/;
  11  
  12  die if $uid eq '';
  13  
  14    $ldap = Net::LDAP->new(
  15                           "$slapdIp",
  16                           port    => "$slapdPort",
  17                           debug   => "$slapdDebug",
  18                           timeout => "$slapdTimeout",
  19                           version => "$slapdVersion"
  20                          );
  21    $ldap->bind(); # Anonymous BIND
  22    $test = $ldap->search(
  23                         base     => "$baseDn",
  24                         scope    => 'sub',
  25                         attrs    => ['uid'],
  26                         filter   => "uid=$uid"
  27                        );
  28  
  29  #die("resultat de la recherche : " . $test->error . ".\n") if ($res->code eq 0); 
  30  #if ($test->count eq 1 ) {
  31  foreach $entry ($test->entries) {
  32      $l = $entry->get_value(l);
  33      print "$l\n";         
  34   }
  35  exit 0


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1