[ 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 => "$peopleDn", 15 scope => 'one', 16 filter => 'uid=*'); 17 warn $res->error if $res->code; 18 foreach $entry ($res->entries) { 19 $uid = $entry->get_value('uid'); 20 next if ($uid eq 'admin' or $uid eq 'adminse3' or $uid eq 'webmaster.etab' or $uid eq 'wetab' or $uid eq 'etabw' or $uid eq 'spip.manager' or $uid eq 'unattend'); 21 $res = $lcs_ldap->delete("uid=$uid,$peopleDn"); 22 print "Suppression de l'utilisateur $uid\n"; 23 warn $res->error if $res->code; 24 }
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 |