[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 #!/usr/bin/perl 2 3 use Net::LDAP; 4 5 require '/etc/SeConfig.ph'; 6 7 # Suppression des comptes utilisateurs 8 $lcs_ldap = Net::LDAP->new("$slapdIp"); 9 $lcs_ldap->bind( 10 dn => $adminDn, 11 password => $adminPw, 12 version => '3' 13 ); 14 $res = $lcs_ldap->search(base => "$computersDn", 15 scope => 'one', 16 filter => 'objectClass=ieee802Device'); 17 warn $res->error if $res->code; 18 foreach $entry ($res->entries) { 19 $cn = $entry->get_value('cn'); 20 $l = $entry->get_value('l'); 21 next if ($l eq 'Maitre' or $l eq 'esclave'); 22 $res = $lcs_ldap->delete("cn=$cn,$computersDn"); 23 print "Suppression de la machine $cn\n"; 24 warn $res->error if $res->code; 25 }
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 |