Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- #----------- Script de création comptes utilisateurs SAMBA AD-DC---------------
- #----------- Auteur: Alexis CHOPPY
- #----------- date de création: 15/11/2016
- #
- #
- set -x
- liste=$1
- defautpass=0123+abc
- identifiant=0
- while IFS="," read onumEtud onom oprenom otel omailPerso
- do
- cut -c 1-2 $oprenom > $identifiant && echo $onom >> $identifiant;
- samba tool user create $identifiant $defautpass \
- --must-change-at-next-login \
- --given-name $oprenom \
- --surname $onom \
- --telephone-number $otel \
- --mail-address $omailPerso \
- --description $onumEtud \
- --profile-path \zeus.mitsic.univ-paris8.fr\profils$$identifiant \
- --home-drive Z \
- --home-directory \zeus.mitsic.univ-paris8.fr\datas$$identifiant \
- done;
- exit 0;
- # explication options:
- # samba-tool user create identifiant_user password_user = creation utilisateur avec mot de passe pushé par defaut
- # --given-name = Zone "Prénom".
- # --surname = Zone "Nom".
- # --profile-path 'path reseau'= Zone "chemin du profil".
- # --home-drive Z = Nom du lecteur reseau distant (ici "Z")
- # --home-directory = Chemin du patage reseau monté en lieu et place de "Z"
- # --must-change-at-next-login = Force l'utilisateur à changer son pass à
- # la premiere connexion.
- # --description = zone description. On y met le num etudiant
- # --mail-address = Zone @ mail
- # --telephone-number = zone num tel
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement