[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 #!/usr/bin/perl 2 3 use Net::Domain; 4 use Unicode::String qw(latin1 utf8); 5 use Se; 6 7 die("Erreur d'argument.\n") if ($#ARGV < 5); 8 $prenom = shift @ARGV; 9 $categorie = pop @ARGV; 10 $sexe = pop @ARGV; 11 $date = pop @ARGV; 12 $password = pop @ARGV; 13 $nom = join ' ', @ARGV; 14 15 $i = 0; 16 17 $prenom = latin1($prenom)->utf8; 18 $nom = latin1($nom)->utf8; 19 20 $lcs_ldap = Net::LDAP->new("$ldap_server"); 21 $lcs_ldap->bind(dn => "$adminDn", 22 password => "$adminPw"); 23 24 # Gid lcs-users 25 $gid = $defaultgid; 26 27 # Fonction attributs GEP -> LDAP (posixAccount) 28 $res1 = processGepUser('undef', $nom, $prenom, $date, $sexe, $password); 29 if ($res1 =~ /<tt><strong>(.*)<\/strong>/) { 30 $uid = $1; 31 $res = 0xffff & system("/usr/share/se3/sbin/groupAddEntry.pl uid=$uid,$peopleDn cn=$categorie,$groupsDn > /dev/null 2>&1"); 32 die("Erreur lors de l'ajoût de l'utilisateur au groupe $categorie.\n") if $res != 0; 33 } 34 35 exit $uid;
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 |