forked from guillaume.emorine/siotp
Nouveau fichier : sisr1/README.md
Supprimé : sisr1/scripts/createLogins.sh Supprimé : sisr1/scripts/createUsers.sh Nouveau fichier : sisr1/tp01-02/README.md Nouveau fichier : sisr1/tp01-02/files_dhcp/README.md Renommé : sisr1/tp01-02/srv-dhcp/dhcpd.conf -> sisr1/tp01-02/files_dhcp/dhcpd.conf Renommé : sisr1/tp01-02/srv-dhcp/hosts -> sisr1/tp01-02/files_dhcp/hosts Renommé : sisr1/tp01-02/srv-dhcp/interfaces -> sisr1/tp01-02/files_dhcp/interfaces Renommé : sisr1/tp01-02/srv-dhcp/isc-dhcp-server -> sisr1/tp01-02/files_dhcp/isc-dhcp-server Renommé : sisr1/tp01-02/srv-dhcp/nat.sh -> sisr1/tp01-02/files_dhcp/nat.sh Nouveau fichier : sisr1/tp01-02/files_dns1/README.md Renommé : sisr1/tp01-02/srv-dns1/db.sio1lab.lan -> sisr1/tp01-02/files_dns1/db.sio1lab.lan Renommé : sisr1/tp01-02/srv-dns1/db.sio1lab.lan.rev -> sisr1/tp01-02/files_dns1/db.sio1lab.lan.rev Renommé : sisr1/tp01-02/srv-dns1/hosts -> sisr1/tp01-02/files_dns1/hosts Renommé : sisr1/tp01-02/srv-dns1/interfaces -> sisr1/tp01-02/files_dns1/interfaces Renommé : sisr1/tp01-02/srv-dns1/named.conf.local -> sisr1/tp01-02/files_dns1/named.conf.local Renommé : sisr1/tp01-02/srv-dns1/named.conf.options -> sisr1/tp01-02/files_dns1/named.conf.options Renommé : sisr1/tp01-02/srv-dns1/resolv.conf -> sisr1/tp01-02/files_dns1/resolv.conf Nouveau fichier : sisr1/tp01-02/files_dns2/README.md Renommé : sisr1/tp01-02/srv-dns2/db.sio1lab.lan -> sisr1/tp01-02/files_dns2/db.sio1lab.lan Renommé : sisr1/tp01-02/srv-dns2/db.sio1lab.lan.rev -> sisr1/tp01-02/files_dns2/db.sio1lab.lan.rev Renommé : sisr1/tp01-02/srv-dns2/hosts -> sisr1/tp01-02/files_dns2/hosts Renommé : sisr1/tp01-02/srv-dns2/interfaces -> sisr1/tp01-02/files_dns2/interfaces Renommé : sisr1/tp01-02/srv-dns2/named.conf.local -> sisr1/tp01-02/files_dns2/named.conf.local Renommé : sisr1/tp01-02/srv-dns2/named.conf.options -> sisr1/tp01-02/files_dns2/named.conf.options Renommé : sisr1/tp01-02/srv-dns2/resolv.conf -> sisr1/tp01-02/files_dns2/resolv.conf Nouveau fichier : sisr1/tp03/README.md Nouveau fichier : sisr1/tp03/files_admin/README.md Renommé : sisr1/tp03/srv-admin-ge/hostname -> sisr1/tp03/files_admin/hostname Renommé : sisr1/tp03/srv-admin-ge/hosts -> sisr1/tp03/files_admin/hosts Renommé : sisr1/tp03/srv-admin-ge/interfaces -> sisr1/tp03/files_admin/interfaces Renommé : sisr1/tp03/srv-admin-ge/nat.sh -> sisr1/tp03/files_admin/nat.sh Renommé : sisr1/tp03/srv-admin-ge/resolv.conf -> sisr1/tp03/files_admin/resolv.conf Nouveau fichier : sisr1/tp03/files_dns2/README.md Renommé : sisr1/tp03/srv-dns2-ge/db.monlabo.lan -> sisr1/tp03/files_dns2/db.monlabo.lan Renommé : sisr1/tp03/srv-dns2-ge/db.monlabo.lan.rev -> sisr1/tp03/files_dns2/db.monlabo.lan.rev Renommé : sisr1/tp03/srv-dns2-ge/hostname -> sisr1/tp03/files_dns2/hostname Renommé : sisr1/tp03/srv-dns2-ge/hosts -> sisr1/tp03/files_dns2/hosts Renommé : sisr1/tp03/srv-dns2-ge/named.conf -> sisr1/tp03/files_dns2/named.conf Renommé : sisr1/tp03/srv-dns2-ge/named.conf.local -> sisr1/tp03/files_dns2/named.conf.local Renommé : sisr1/tp03/srv-dns2-ge/named.conf.options -> sisr1/tp03/files_dns2/named.conf.options Renommé : sisr1/tp03/srv-dns2-ge/resolv.conf -> sisr1/tp03/files_dns2/resolv.conf Nouveau fichier : sisr1/tp03/files_service/README.md Renommé : sisr1/tp03/srv-service-ge/db.monlabo.lan -> sisr1/tp03/files_service/db.monlabo.lan Renommé : sisr1/tp03/srv-service-ge/db.monlabo.lan.rev -> sisr1/tp03/files_service/db.monlabo.lan.rev Renommé : sisr1/tp03/srv-service-ge/dhclient.conf -> sisr1/tp03/files_service/dhclient.conf Renommé : sisr1/tp03/srv-service-ge/dhcpd.conf -> sisr1/tp03/files_service/dhcpd.conf Renommé : sisr1/tp03/srv-service-ge/hostname -> sisr1/tp03/files_service/hostname Renommé : sisr1/tp03/srv-service-ge/hosts -> sisr1/tp03/files_service/hosts Renommé : sisr1/tp03/srv-service-ge/interfaces -> sisr1/tp03/files_service/interfaces Renommé : sisr1/tp03/srv-service-ge/isc-dhcp-server -> sisr1/tp03/files_service/isc-dhcp-server Renommé : sisr1/tp03/srv-service-ge/named.conf -> sisr1/tp03/files_service/named.conf Renommé : sisr1/tp03/srv-service-ge/named.conf.local -> sisr1/tp03/files_service/named.conf.local Renommé : sisr1/tp03/srv-service-ge/named.conf.options -> sisr1/tp03/files_service/named.conf.options Nouveau fichier : sisr1/tp04/README.md Nouveau fichier : sisr1/tp04/scripts_and_files/README.md
This commit is contained in:
parent
52569f3a5f
commit
4d0210b9e3
1
sisr1/README.md
Normal file
1
sisr1/README.md
Normal file
@ -0,0 +1 @@
|
||||
Each folder bears the name of the TP (practical work) it belongs to.
|
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
rm ./logins.csv
|
||||
while read line
|
||||
do
|
||||
touch ./temptp4.txt
|
||||
file="./temptp4.txt"
|
||||
echo $line > $file
|
||||
surname=$(cut -d "," -f 1 $file)
|
||||
name=$(cut -d "," -f 2 $file)
|
||||
group=$(cut -d "," -f 5 $file)
|
||||
initials=$(cut -c 1 $file)
|
||||
id=$(echo $initials$name | tr [:upper:] [:lower:])
|
||||
passwd=$(echo $RANDOM | md5sum | head -c 8)
|
||||
echo $line ./temptp4.txt
|
||||
echo $id","$passwd","$surname","$name","$group >> logins.csv
|
||||
rm ./temptp4.txt
|
||||
|
||||
done < ./Users.csv
|
@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
while read line
|
||||
do
|
||||
touch ./temptp4.txt
|
||||
file="./temptp4.txt"
|
||||
echo $line > $file
|
||||
user=$(cut -d "," -f 1 $file)
|
||||
usergroup=$(cut -d "," -f 5 $file)
|
||||
passwd=$(cut -d "," -f 2 $file)
|
||||
if ! grep -q $usergroup /etc/group ; then
|
||||
groupadd -f $usergroup
|
||||
fi
|
||||
useradd $user --create-home --groups $usergroup --shell /bin/bash
|
||||
(echo $passwd ; echo $passwd) | passwd $user
|
||||
chown -hR $user /home/$user
|
||||
rm ./temptp4.txt
|
||||
done < ./logins.csv
|
1
sisr1/tp01-02/README.md
Normal file
1
sisr1/tp01-02/README.md
Normal file
@ -0,0 +1 @@
|
||||
Each folder is called files_{Virtual Machine's name}.
|
1
sisr1/tp01-02/files_dhcp/README.md
Normal file
1
sisr1/tp01-02/files_dhcp/README.md
Normal file
@ -0,0 +1 @@
|
||||
Files for the srv-dhcp-ge Virtual Machine, from the FIRST and SECOND TPs.
|
1
sisr1/tp01-02/files_dns1/README.md
Normal file
1
sisr1/tp01-02/files_dns1/README.md
Normal file
@ -0,0 +1 @@
|
||||
Files for the srv-dns1-ge Virtual Machine, from the FIRST and SECOND TPs.
|
1
sisr1/tp01-02/files_dns2/README.md
Normal file
1
sisr1/tp01-02/files_dns2/README.md
Normal file
@ -0,0 +1 @@
|
||||
Files for the srv-dns2-ge Virtual Machine, from the FIRST AND SECOND TPs.
|
1
sisr1/tp03/README.md
Normal file
1
sisr1/tp03/README.md
Normal file
@ -0,0 +1 @@
|
||||
Each folder is called files_{Virtual Machine's name}.
|
1
sisr1/tp03/files_admin/README.md
Normal file
1
sisr1/tp03/files_admin/README.md
Normal file
@ -0,0 +1 @@
|
||||
Files for the srv-admin-ge Virtual Machine.
|
1
sisr1/tp03/files_dns2/README.md
Normal file
1
sisr1/tp03/files_dns2/README.md
Normal file
@ -0,0 +1 @@
|
||||
Files for the srv-dns2-ge Virtual Machine.
|
1
sisr1/tp03/files_service/README.md
Normal file
1
sisr1/tp03/files_service/README.md
Normal file
@ -0,0 +1 @@
|
||||
Files for the srv-dns1-ge Virtual Machine.
|
1
sisr1/tp04/README.md
Normal file
1
sisr1/tp04/README.md
Normal file
@ -0,0 +1 @@
|
||||
Folders bear an explicit name, unlike the predecessors.
|
1
sisr1/tp04/scripts_and_files/README.md
Normal file
1
sisr1/tp04/scripts_and_files/README.md
Normal file
@ -0,0 +1 @@
|
||||
This folder holds every single file and script done in the FOURTH TP.
|
Loading…
x
Reference in New Issue
Block a user