Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #
  3. #----------- Script de création comptes utilisateurs SAMBA AD-DC---------------
  4. #----------- Auteur: Alexis CHOPPY
  5. #----------- date de création: 15/11/2016
  6. #
  7. #
  8. set -x
  9. liste=$1
  10. defautpass=0123+abc
  11. identifiant=0
  12. while IFS="," read onumEtud onom oprenom otel omailPerso
  13. do
  14. cut -c 1-2 $oprenom > $identifiant && echo $onom >> $identifiant;
  15.  
  16. samba tool user create $identifiant $defautpass \
  17.                         --must-change-at-next-login \
  18.                         --given-name $oprenom \
  19.                         --surname $onom \
  20.                         --telephone-number $otel \
  21.                         --mail-address $omailPerso \
  22.                         --description $onumEtud \
  23.                         --profile-path \zeus.mitsic.univ-paris8.fr\profils$$identifiant \
  24.                         --home-drive Z \
  25.                         --home-directory \zeus.mitsic.univ-paris8.fr\datas$$identifiant \
  26. done;
  27.  
  28. exit 0;
  29.  
  30.  
  31. # explication options:
  32. # samba-tool user create identifiant_user password_user = creation utilisateur avec mot de passe pushé par defaut
  33. # --given-name   = Zone "Prénom".
  34. # --surname      = Zone "Nom".
  35. # --profile-path 'path reseau'= Zone "chemin du profil".
  36. # --home-drive Z   = Nom du lecteur reseau distant (ici "Z")
  37. # --home-directory = Chemin du patage reseau monté en lieu et place de "Z"
  38. # --must-change-at-next-login = Force l'utilisateur à changer son pass à
  39. # la premiere connexion.
  40. # --description = zone description. On y met le num etudiant
  41. # --mail-address = Zone @ mail
  42. # --telephone-number = zone num tel
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement