creation la login
This commit is contained in:
parent
8f6038d5e0
commit
66e5630d48
23
sisr1/tp04_scripts_admin/createLogins.sh
Normal file
23
sisr1/tp04_scripts_admin/createLogins.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
fichier=Users.csv
|
||||||
|
fichier_a_ecrire=./logins.csv #Suppression puis création du fichier
|
||||||
|
rm ./logins.csv 2> /dev/null #Redirection des erreurs
|
||||||
|
touch ./logins.csv
|
||||||
|
while read ligne
|
||||||
|
do
|
||||||
|
aecrire=""
|
||||||
|
last_name=$(echo $ligne | cut -d "," -f2 )
|
||||||
|
|
||||||
|
first_name=$(echo $ligne | cut -d "," -f1)
|
||||||
|
|
||||||
|
group=$(echo $ligne | cut -d "," -f5)
|
||||||
|
|
||||||
|
login=$(echo $first_name | cut -c1)$last_name
|
||||||
|
login=$(echo $login | tr [:upper:] [:lower:]) #la commande permet d'avoir les noms d'utilisateur en minuscule
|
||||||
|
login=$(echo $login | tr -dc [:alnum:])
|
||||||
|
passwd=$(echo $RANDOM | md5sum | head -c8)
|
||||||
|
|
||||||
|
aecrire="$login;$passwd;$first_name;$last_name;$group"
|
||||||
|
echo $aecrire >> $fichier_a_ecrire
|
||||||
|
|
||||||
|
done < $fichier
|
5
sisr1/tp04_scripts_admin/gitpush.sh
Normal file
5
sisr1/tp04_scripts_admin/gitpush.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bsh
|
||||||
|
message=$1
|
||||||
|
git add .
|
||||||
|
git commit -m "$message"
|
||||||
|
git push -u https://aboulai.bayo@gitea.lyc-lecastel.fr/aboulai.bayo/siotp.git
|
30
sisr1/tp04_scripts_admin/logins.csv
Normal file
30
sisr1/tp04_scripts_admin/logins.csv
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
eberthelmot;38ff848b;Ermengarde;Berthelmot;Accountant
|
||||||
|
kbunker;0c4fd3d8;Kassi;Bunker;Production
|
||||||
|
mmccallum;fb19eb57;Moises;McCallum;Production
|
||||||
|
plune;7b773108;Patrizio;Lune;Accountant
|
||||||
|
beverix;88b5357c;Blanch;Everix;Accountant
|
||||||
|
skibbel;c2b43eb8;Stafani;Kibbel;Production
|
||||||
|
imosdell;ed8d2b54;Ignacius;Mosdell;Management
|
||||||
|
jwallerbridge;5f50f62f;Jeana;Waller-Bridge;Management
|
||||||
|
edressel;7bd2fb4a;Elroy;Dressel;Production
|
||||||
|
tstrettell;d6494580;Thea;Strettell;Production
|
||||||
|
sinsoll;2be328b8;Solomon;Insoll;Accountant
|
||||||
|
cfeedome;ce7270e0;Carri;Feedome;Accountant
|
||||||
|
pchetwind;ce51a793;Padraic;Chetwind;Management
|
||||||
|
sdugo;f1f3aff3;Solly;D'Ugo;Production
|
||||||
|
kmaccostigan;7d6fc017;Konstanze;MacCostigan;Accountant
|
||||||
|
rpowlesland;870f70b5;Roxane;Powlesland;Management
|
||||||
|
okennealy;0b4b4a0d;Orelle;Kennealy;Production
|
||||||
|
ssoitoux;767c0da3;Sukey;Soitoux;Production
|
||||||
|
nsyce;87652ba1;Nelli;Syce;Production
|
||||||
|
cshillam;3e8236e6;Clarisse;Shillam;Production
|
||||||
|
cgueny;a57e6b35;Carin;Gueny;Management
|
||||||
|
driepel;bee179b0;Donny;Riepel;Production
|
||||||
|
dralfe;0ac4c7fc;Daniella;Ralfe;Production
|
||||||
|
lclynmans;ec02f4ef;Lexy;Clynmans;Production
|
||||||
|
gadamthwaite;f2cdf129;Gardiner;Adamthwaite;Production
|
||||||
|
wlippett;9a414b41;Woodman;Lippett;Production
|
||||||
|
nmunnion;64091f68;Nadya;Munnion;Production
|
||||||
|
lhabershon;5f29b4fe;Llewellyn;Habershon;Production
|
||||||
|
igreatrex;0f5e672f;Isaak;Greatrex;Production
|
||||||
|
dfrostdyke;eeb13ced;Darill;Frostdyke;Production
|
|
Loading…
x
Reference in New Issue
Block a user