nouveau fichier : TP04/Scripts/LeScript.sh

nouveau fichier : TP04/Scripts/Users.csv
	nouveau fichier : TP04/Scripts/createLogins.sh
	nouveau fichier : TP04/Scripts/createUsers.sh
	nouveau fichier : TP04/Scripts/logins.csv
	nouveau fichier : TP04/Scripts/testlogin.csv
This commit is contained in:
root 2024-03-04 11:03:37 +01:00
parent 503b1c4af0
commit 4d789def5c
14 changed files with 504 additions and 0 deletions

319
TP04/Scripts/.bash_history Normal file
View File

@ -0,0 +1,319 @@
sudo apt-get install sudo mc tcpdump
apt-get install sudo mc tcpdump
sudo cd
host dns
exit
nano /etc/ssh/sshd_config
ip a
systemctl restart ssh
nano /etc/ssh/sshd_config
ip r
nano /etc/network/interfaces
ssh-keygen
ip a*
ip a
host dns
host google.com
host dns
cat /etc/resolv.conf
dhclient
cat /etc/resolv.conf
dhclient
reboot
ip a
cat /etc/resolv.conf
host dns
ping 172.16.0.1
host srv-service
nano /etc/resolv.conf
host srv-service
host google.com
host 172.16.0.254
host 172.16.0.254
logout
ip a
ifdown enp0s3
ifup enp0s3
ip a
nano /etc/resolv.conf
host google.com
ip a
nano /etc/network/interfaces
nano /etc/network/interfaces
nano /etc/network/interfaces
i^p a
ip a
touch createLogins.sh
bash createLogins.sh
nano createLogins.sh
nano createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
nano createLogins.sh
nano createLogins.sh
nano createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
ls
cat logins.csv
bash createLogins.sh
cat logins.csv
nano createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
bash createLogins.sh
nano createLogins.sh
ip a
bash createLogins.sh
ls
ls
ls -r
ls -l
ls -f
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
ls /home/sio/
ls
ls -f
ip a
ls
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
ls
ls- l
ls- r
ls -l
ls
clear
nano createLogins.sh
scp ~/Téléchargements/Users.csv root@192.168.0.30
scp /Téléchargements/Users.csv root@192.168.0.30
scp ~/Téléchargements/Users.csv root@192.168.0.30:etc/
ls
ls /etc/
cp /etc/Users.csv ./
ls
bash createLogins.sh
nano createLogins.sh
bash createLogins.sh
nano createLogins.sh
ls
cat logins.csv
nano createLogins.sh
touch createUsers.sh
nano createUsers.sh
nano createLogins.sh
nano createUsers.sh
cat logins.csv
clear
nano createUsers.sh
touch testlogin.csv
nano testlogin.csv
nano logins.csv
nano testlogin.csv
nano logins.csv
nano testlogin.csv
nano logins.csv
nano testlogin.csv
nano createUsers.sh
nano /etc/group
nano createUsers.sh
getent group
nano createUsers.sh
bash createUsers.sh
nano createUsers.sh
nano testlogin.csv
nano createUsers.sh
bash createUsers.sh tcpdump
nano createUsers.sh
nano createUsers.sh
bash createUsers.sh 1ertest
nano createUsers.sh
bash createUsers.sh tcpdump
nano createUsers.sh
man grep
nano createUsers.sh
bash createUsers.sh tcpdump
nano createUsers.sh
bash createUsers.sh tcpdump
nano createUsers.sh
bash createUsers.sh tcpdump
nano createUsers.sh
bash createUsers.sh tcpdump
bash createUsers.sh gre1
bash createUsers.sh gre1
nano createUsers.sh
bash createLogins.sh
nano createLogins.sh
nano createUsers.sh
ls
nano createUsers.sh
nano createUsers.sh b
nano createUsers.sh
nano createUsers.sh
bash createUsers.sh
bash createUsers.sh
bash createUsers.sh
bash createUsers.sh
bash createUsers.sh
bash createUsers.sh
bash createUsers.sh
nano /etc/group
nano testlogin.csv
cat temptp4.txt
cat temptp4.txt
cat temptp4.txt
cat temptp4.txt
nano createUsers.sh
nano createUsers.sh
nano createUsers.sh
nano /etc/group
nano createUsers.sh
nano createUsers.sh
nano createUsers.sh
nano createUsers.sh
nano createUsers.sh
nano createUsers.sh
bash createUsers.sh
nano createUsers.sh
nano createUsers.sh
nano createUsers.sh
nano createUsers.sh
bash createUsers.sh
bash createUsers.sh
nano createUsers.sh
bash createUsers.sh
nano createUsers.sh
bash createUsers.sh
getent Users
cd /etc
ls
cat passwd
cat /users
cat /group
cat group
man usermod
useradd anthonycon --gropups
useradd anthonycon --groups
useradd anthonycon --groups
useradd anthonycon --groups
useradd anthonycon --groups
useradd anthonycon --groups
useradd anthonycon --groups sio
cat group
cd
nano createUsers.sh
nano createUsers.sh
nano createUsers.sh
nano createUsers.sh
bash createUsers.sh
nano createUsers.sh
nano createUsers.sh
bash createUsers.sh
nano createUsers.sh
bash createUsers.sh
bash createUsers.sh
nano testlogin.csv
bash createUsers.sh
nano testlogin.csv
nano createUsers.sh
bash createUsers.sh
ls /home
ls -l
ls -l /home
nano createUsers.sh
nano createUsers.sh
bash createUsers.sh
bash createUsers.sh
nano createUsers.sh
ip a
nano create
nano createUsers.sh
nano logins.csv
nano testlogin.csv
nano createUsers.sh
bash createUsers.sh
logout
nano createUsers.sh
logout
ls -l /home
nano createUsers.sh
touch LeScript
mv LeScript LeScript.sh
nano LeScript.sh
nano LeScript.sh
nano LeScript.sh
bash LeScript.sh
nano LeScript.sh
nano createUsers.sh
nano LeScript.sh
nano LeScript.sh
bash LeScript.sh
nano LeScript.sh
bash LeScript.sh
nano LeScript.sh
nano createUsers.sh
nano LeScript.sh
ls
logout
ip a
nano LeScript.sh
ls
nano LeScript.sh
nano LeScript.sh
nano createUsers.sh
man groupa
nano LeScript.sh
nano LeScript.sh
ls
nano LeScript.sh
nano LeScript.sh
bash LeScript.sh
nano LeScript.sh
bash LeScript.sh
ls
nano LeScript.sh
bash LeScript.sh
nano LeScript.sh
bash LeScript.sh
bash createLogins.sh
nano createLogins.sh
nano LeScript.sh

18
TP04/Scripts/.bashrc Normal file
View File

@ -0,0 +1,18 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
# export LS_OPTIONS='--color=auto'
# eval "$(dircolors)"
# alias ls='ls $LS_OPTIONS'
# alias ll='ls $LS_OPTIONS -l'
# alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'

1
TP04/Scripts/.lesshst Normal file
View File

@ -0,0 +1 @@
.less-history-file:

9
TP04/Scripts/.profile Normal file
View File

@ -0,0 +1,9 @@
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n 2> /dev/null || true

39
TP04/Scripts/.ssh/id_rsa Normal file
View File

@ -0,0 +1,39 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABDN5LV/DY
sSGO0EoTx088Q3AAAAEAAAAAEAAAGXAAAAB3NzaC1yc2EAAAADAQABAAABgQC0imYJ5Oqm
SXlpzBSKm8dSF+vgWAdn8FIdzCO+wT2Vb+dSUaUwXm3KTbW+a/S9KGz6Vjd63pHZfkydS1
EPGnp1U/jOdDuNXAOT/7TCoGcrDyEdAMUmxFA/cUMEDvpgpoEicsJZy03BCTcG1jCa5q7a
MXpKDmSJoOg6DcS1emsYmli74x4PANOcN19cn69QHviLCxIFI+sanQUSXZwYRsYYcczRh0
AAo3iIMzVDDZJ979wnpojdDRLtChxrnmGNSeIiHf0HZSft95cwjH8+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hdsvBzDNRgZ5Jz4Li3yZQgfRTODgZecLZt2Mw1WyTW+Et99I4+NI21yq0XdYYIus7c=
|1|PPdVJ6gCrKfevKGNtBMzmQpHMmw=|CMNFJ7HJsDqTt1EdTpIw0IW/UGA= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDMsEaO28xNEWNh4zHy1BN3ZEbwsa1VysH+agH79NmTdWqm67BR6R6+Rqc5oWJaNFKDpJROU/6ncOoVM3Qk7MGU=
|1|bcNjCJb/OpmfhuYIa9YCIFtN/P4=|DVHRinAYdbdDUIdDuRLFbmFvrwA= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIObY4qQyaHJA5+Cvml7YgJvxe/w+A49n0BTnedm7YQ95

8
TP04/Scripts/LeScript.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
echo "Entrer l'adresse IP !"
read address
scp ./createUsers.sh root@$address:/root
scp ./logins.csv root@$address:/root
ssh root@$address "bash /root/createUsers.sh"
ssh root@$address "rm /root/createUsers.sh"
ssh root@$address "rm /root/logins.csv"

30
TP04/Scripts/Users.csv Normal file
View File

@ -0,0 +1,30 @@
Ermengarde,Berthelmot,eberthelmot0@webmd.com,Female,Accountant,
Kassi,Bunker,kbunker1@xinhuanet.com,Female,Production,
Moises,McCallum,mmccallum2@i2i.jp,Male,Production,
Patrizio,Lune,plune3@upenn.edu,Male,Accountant,
Blanch,Everix,beverix4@php.net,Female,Accountant,
Stafani,Kibbel,skibbel5@marriott.com,Female,Production,
Ignacius,Mosdell,imosdell6@cloudflare.com,Male,Management,
Jeana,Waller-Bridge,jwallerbridge7@mapy.cz,Female,Management,
Elroy,Dressel,edressel8@opera.com,Male,Production,
Thea,Strettell,tstrettell9@nature.com,Female,Production,
Solomon,Insoll,sinsolla@utexas.edu,Male,Accountant,
Carri,Feedome,cfeedomeb@ask.com,Female,Accountant,
Padraic,Chetwind,pchetwindc@last.fm,Male,Management,
Solly,D'Ugo,sdugod@uiuc.edu,Male,Production,
Konstanze,MacCostigan,kmaccostigane@seattletimes.com,Female,Accountant,
Roxane,Powlesland,rpowleslandf@pcworld.com,Female,Management,
Orelle,Kennealy,okennealyg@arstechnica.com,Female,Production,
Sukey,Soitoux,ssoitouxh@shinystat.com,Female,Production,
Nelli,Syce,nsycei@blogger.com,Female,Production,
Clarisse,Shillam,cshillamj@dailymotion.com,Female,Production,
Carin,Gueny,cguenyk@naver.com,Female,Management,
Donny,Riepel,driepell@addtoany.com,Male,Production,
Daniella,Ralfe,dralfem@wunderground.com,Female,Production,
Lexy,Clynmans,lclynmansn@furl.net,Female,Production,
Gardiner,Adamthwaite,gadamthwaiteo@spotify.com,Male,Production,
Woodman,Lippett,wlippettp@purevolume.com,Male,Production,
Nadya,Munnion,nmunnionq@flavors.me,Female,Production,
Llewellyn,Habershon,lhabershonr@alibaba.com,Male,Production,
Isaak,Greatrex,igreatrexs@seesaa.net,Male,Production,
Darill,Frostdyke,dfrostdyket@cafepress.com,Male,Production,
1 Ermengarde Berthelmot eberthelmot0@webmd.com Female Accountant
2 Kassi Bunker kbunker1@xinhuanet.com Female Production
3 Moises McCallum mmccallum2@i2i.jp Male Production
4 Patrizio Lune plune3@upenn.edu Male Accountant
5 Blanch Everix beverix4@php.net Female Accountant
6 Stafani Kibbel skibbel5@marriott.com Female Production
7 Ignacius Mosdell imosdell6@cloudflare.com Male Management
8 Jeana Waller-Bridge jwallerbridge7@mapy.cz Female Management
9 Elroy Dressel edressel8@opera.com Male Production
10 Thea Strettell tstrettell9@nature.com Female Production
11 Solomon Insoll sinsolla@utexas.edu Male Accountant
12 Carri Feedome cfeedomeb@ask.com Female Accountant
13 Padraic Chetwind pchetwindc@last.fm Male Management
14 Solly D'Ugo sdugod@uiuc.edu Male Production
15 Konstanze MacCostigan kmaccostigane@seattletimes.com Female Accountant
16 Roxane Powlesland rpowleslandf@pcworld.com Female Management
17 Orelle Kennealy okennealyg@arstechnica.com Female Production
18 Sukey Soitoux ssoitouxh@shinystat.com Female Production
19 Nelli Syce nsycei@blogger.com Female Production
20 Clarisse Shillam cshillamj@dailymotion.com Female Production
21 Carin Gueny cguenyk@naver.com Female Management
22 Donny Riepel driepell@addtoany.com Male Production
23 Daniella Ralfe dralfem@wunderground.com Female Production
24 Lexy Clynmans lclynmansn@furl.net Female Production
25 Gardiner Adamthwaite gadamthwaiteo@spotify.com Male Production
26 Woodman Lippett wlippettp@purevolume.com Male Production
27 Nadya Munnion nmunnionq@flavors.me Female Production
28 Llewellyn Habershon lhabershonr@alibaba.com Male Production
29 Isaak Greatrex igreatrexs@seesaa.net Male Production
30 Darill Frostdyke dfrostdyket@cafepress.com Male Production

View File

@ -0,0 +1,17 @@
#!/bin/bash
#
rm ./logins.csv
while read line
do
touch ./temp.txt
echo $line > ./temp.txt
prenom=$(cut -d "," -f 1 ./temp.txt)
nom=$(cut -d "," -f 2 ./temp.txt)
initial=$(cut -c 1 ./temp.txt)
id=$(echo $initial$nom | tr [:upper:] [:lower:])
passwd=$(echo $RANDOM | md5sum | head -c 8)
echo $id","$passwd","$prenom","$nom","$(cut -d "," -f 5 ./temp.txt)"," >> ./logins.csv
rm ./temp.txt
done < ./Users.csv

View File

@ -0,0 +1,19 @@
#!/bin/bash
while read line
do
touch ./temptp4.txt
echo $line > ./temptp4.txt
group=$(cut -d "," -f 5 ./temptp4.txt)
user=$(cut -d "," -f 1 ./temptp4.txt)
mdp=$(cut -d "," -f 2 ./temptp4.txt)
if grep -q $group /etc/group ; then
echo "ok"
else
echo "existe pas ; création"
groupadd -f $group
fi
useradd $user --create-home --groups $group --shell /bin/bash
echo "$user:$mdp" | chpasswd
rm ./temptp4.txt
done < logins.csv

30
TP04/Scripts/logins.csv Normal file
View File

@ -0,0 +1,30 @@
eberthelmot,26531516,Ermengarde,Berthelmot,Accountant,
kbunker,900e4e1b,Kassi,Bunker,Production,
mmccallum,91aa2192,Moises,McCallum,Production,
plune,bf26a431,Patrizio,Lune,Accountant,
beverix,1ecbd424,Blanch,Everix,Accountant,
skibbel,63e581d2,Stafani,Kibbel,Production,
imosdell,e247d728,Ignacius,Mosdell,Management,
jwaller-bridge,ea178a13,Jeana,Waller-Bridge,Management,
edressel,72001e83,Elroy,Dressel,Production,
tstrettell,7600fc16,Thea,Strettell,Production,
sinsoll,01b303e4,Solomon,Insoll,Accountant,
cfeedome,66e6ab97,Carri,Feedome,Accountant,
pchetwind,e4200d0c,Padraic,Chetwind,Management,
sd'ugo,b3e00991,Solly,D'Ugo,Production,
kmaccostigan,4185bf2f,Konstanze,MacCostigan,Accountant,
rpowlesland,45e48289,Roxane,Powlesland,Management,
okennealy,a354f4b4,Orelle,Kennealy,Production,
ssoitoux,065022fc,Sukey,Soitoux,Production,
nsyce,440a9fe0,Nelli,Syce,Production,
cshillam,a60ba40e,Clarisse,Shillam,Production,
cgueny,cc07a74d,Carin,Gueny,Management,
driepel,c8e6358d,Donny,Riepel,Production,
dralfe,94a56564,Daniella,Ralfe,Production,
lclynmans,5fa49cab,Lexy,Clynmans,Production,
gadamthwaite,c553a95c,Gardiner,Adamthwaite,Production,
wlippett,c4d7d26f,Woodman,Lippett,Production,
nmunnion,ae8d3333,Nadya,Munnion,Production,
lhabershon,c24f8825,Llewellyn,Habershon,Production,
igreatrex,516350fa,Isaak,Greatrex,Production,
dfrostdyke,1e293f6b,Darill,Frostdyke,Production,
1 eberthelmot 26531516 Ermengarde Berthelmot Accountant
2 kbunker 900e4e1b Kassi Bunker Production
3 mmccallum 91aa2192 Moises McCallum Production
4 plune bf26a431 Patrizio Lune Accountant
5 beverix 1ecbd424 Blanch Everix Accountant
6 skibbel 63e581d2 Stafani Kibbel Production
7 imosdell e247d728 Ignacius Mosdell Management
8 jwaller-bridge ea178a13 Jeana Waller-Bridge Management
9 edressel 72001e83 Elroy Dressel Production
10 tstrettell 7600fc16 Thea Strettell Production
11 sinsoll 01b303e4 Solomon Insoll Accountant
12 cfeedome 66e6ab97 Carri Feedome Accountant
13 pchetwind e4200d0c Padraic Chetwind Management
14 sd'ugo b3e00991 Solly D'Ugo Production
15 kmaccostigan 4185bf2f Konstanze MacCostigan Accountant
16 rpowlesland 45e48289 Roxane Powlesland Management
17 okennealy a354f4b4 Orelle Kennealy Production
18 ssoitoux 065022fc Sukey Soitoux Production
19 nsyce 440a9fe0 Nelli Syce Production
20 cshillam a60ba40e Clarisse Shillam Production
21 cgueny cc07a74d Carin Gueny Management
22 driepel c8e6358d Donny Riepel Production
23 dralfe 94a56564 Daniella Ralfe Production
24 lclynmans 5fa49cab Lexy Clynmans Production
25 gadamthwaite c553a95c Gardiner Adamthwaite Production
26 wlippett c4d7d26f Woodman Lippett Production
27 nmunnion ae8d3333 Nadya Munnion Production
28 lhabershon c24f8825 Llewellyn Habershon Production
29 igreatrex 516350fa Isaak Greatrex Production
30 dfrostdyke 1e293f6b Darill Frostdyke Production

View File

@ -0,0 +1,3 @@
test1,1,prénom1,nom1,grp1
test2,2,prénom2,nom2,grp1
test3,3,prénom3,nom3,grp2
1 test1 1 prénom1 nom1 grp1
2 test2 2 prénom2 nom2 grp1
3 test3 3 prénom3 nom3 grp2