[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 #!/usr/bin/perl 2 die("Erreur d'argument") if ($#ARGV != 1); 3 4 use Net::LDAP; 5 6 require '/etc/SeConfig.ph'; 7 8 ($uid, $action) = @ARGV; 9 10 $dn = 'uid=' . $uid . ',' . $peopleDn; 11 $uid =~ /^(\w*)\.(\w*)$/; 12 13 die if $uid eq ''; 14 # on ecrit dans la base ldap l'action a effectuer à la prochaine connexion.. 15 16 $ldap = Net::LDAP->new( 17 "$slapdIp", 18 port => "$slapdPort", 19 debug => "$slapdDebug", 20 timeout => "$slapdTimeout", 21 version => "$slapdVersion" 22 ); 23 $ldap->bind( 24 $adminDn, 25 password => $adminPw 26 ); 27 $res = $ldap->modify( 28 $dn, 29 replace => { 30 l => "$action" 31 } 32 ); 33 34 $res->code && die("Erreur LDAP : " . $res->code . " => " . $res->error . ".\n"); 35 36 exit O;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |