Compare commits
No commits in common. "main" and "tp01" have entirely different histories.
@ -1,35 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Affectation du nom d'utilisateur passé en paramètre à la variable "username"
|
|
||||||
username=$1
|
|
||||||
# extraction de la ligne correspondante du fichier de logs
|
|
||||||
user_line=$(grep $username ./logs_access.txt)
|
|
||||||
# Création d'une variable comprenant les groupes recherchés
|
|
||||||
groups=""
|
|
||||||
# Vérification de la présence du groupe sudo -> ajout de la fonction "administrateur" à $groups
|
|
||||||
if [[ $(echo $user_line | grep "sudo") != "" ]] ; then
|
|
||||||
groups=$groups" administrateur "
|
|
||||||
fi
|
|
||||||
# Vérification de la présence du groupe slam -> ajout de la fonction "développeur" à $groups
|
|
||||||
if [[ $(echo $user_line | grep "slam") != "" ]] ; then
|
|
||||||
groups=$groups" developpeur "
|
|
||||||
fi
|
|
||||||
# Vérification de la présence du groupe sisr -> ajout de la fonction "technicien" à $groups
|
|
||||||
if [[ $(echo $user_line | grep "sisr") != "" ]] ; then
|
|
||||||
groups=$groups" technicien "
|
|
||||||
fi # récupération du champ date + temps
|
|
||||||
|
|
||||||
date_time=$(echo $user_line | cut -d ":" -f4) #f4 -> 4eme champs
|
|
||||||
# récupération des champs dates (format US) et temps dans deux variables distinctes
|
|
||||||
date_us=$(echo $date_time | cut -d "_" -f1)
|
|
||||||
#[...]
|
|
||||||
date_heure=$(echo $date_time | cut -d "_" -f2)
|
|
||||||
# extraction de chaque information utile de ces champs
|
|
||||||
day=$(echo $date_us | cut -d "/" -f3)
|
|
||||||
month=$(echo $date_us | cut -d "/" -f2)
|
|
||||||
years=$(echo $date_us | cut -d "/" -f1)
|
|
||||||
|
|
||||||
hours=$(echo $date_heure | cut -d "-" -f1)
|
|
||||||
minutes=$(echo $date_heure | cut -d "-" -f2)
|
|
||||||
secondes=$(echo $date_heure | cut -d "-" -f3)
|
|
||||||
echo " L'utilisateur $username est membre de(s) groupe(s) $groups et sa dernière connexion remonte au $day/$month/$years à $hours h $minutes min et $secondes sec."
|
|
@ -1,5 +0,0 @@
|
|||||||
admin:1000:users,sudo:24/10/07_21-41-28
|
|
||||||
jibril:1001:users,eleves_sio,slam:24/09/29_07-46-51
|
|
||||||
lea:1002:users,sudo,sisr:24/12/14_18-31-27
|
|
||||||
mona:1003:users,eleves_sio,sisr:24/10/05_15-30-23
|
|
||||||
luc:1004:users,eleves_sio,slam:24/10/02_12-14-50
|
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
files="./etc/crontab
|
|
||||||
|
|
||||||
0 2 * * * /root/scriptsauvegarde.sh
|
|
@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
message=$1
|
|
||||||
|
|
||||||
git add .
|
|
||||||
git commit -m "$message"
|
|
||||||
git push -u https://tom.guerin@gitea.lyc-lecastel.fr/tom.guerin/siotp.git
|
|
@ -1,5 +0,0 @@
|
|||||||
root@172.16.0.254:/etc/dhcp/dhcpd.conf
|
|
||||||
root@172.16.0.254:/etc/default/isc-dhcp-server
|
|
||||||
root@172.16.0.254:/etc/bind/named.conf.local
|
|
||||||
root@172.16.0.254:/etc/bind/db.monlabo.lan
|
|
||||||
root@172.16.0.254:/etc/bind/db.monlabo.lan.rev
|
|
@ -1,16 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
|
|
||||||
backup="/root/backupsvg"
|
|
||||||
mkdir $backup
|
|
||||||
while read line
|
|
||||||
do
|
|
||||||
scp $line $backup
|
|
||||||
done < liste_a_copier
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tar -zcvf /root/svg.tar.gz $backup
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
|
|
||||||
# This file describes the network interfaces available on your system
|
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
|
||||||
|
|
||||||
source /etc/network/interfaces.d/*
|
|
||||||
|
|
||||||
# The loopback network interface
|
|
||||||
auto lo
|
|
||||||
iface lo inet loopback
|
|
||||||
|
|
||||||
# The primary network interface
|
|
||||||
allow-hotplug enp0s3
|
|
||||||
iface enp0s3 inet dhcp
|
|
||||||
#iface enp0s3 inet static
|
|
||||||
# address 192.168.0.24/24
|
|
||||||
# gateway 192.168.0.1
|
|
||||||
|
|
||||||
|
|
||||||
auto enp0s8
|
|
||||||
iface enp0s8 inet static
|
|
||||||
address 192.168.2.1/24
|
|
||||||
# gateway 192.168.0.1
|
|
||||||
|
|
@ -1,112 +0,0 @@
|
|||||||
# dhcpd.conf
|
|
||||||
#
|
|
||||||
# Sample configuration file for ISC dhcpd
|
|
||||||
#
|
|
||||||
|
|
||||||
# option definitions common to all supported networks...
|
|
||||||
#option domain-name "sio-tg.lan";
|
|
||||||
option domain-name-servers ns1.example.org, ns2.example.org;
|
|
||||||
|
|
||||||
default-lease-time 3600;
|
|
||||||
max-lease-time 7200;
|
|
||||||
|
|
||||||
# The ddns-updates-style parameter controls whether or not the server will
|
|
||||||
# attempt to do a DNS update when a lease is confirmed. We default to the
|
|
||||||
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
|
||||||
# have support for DDNS.)
|
|
||||||
ddns-update-style none;
|
|
||||||
|
|
||||||
# If this DHCP server is the official DHCP server for the local
|
|
||||||
# network, the authoritative directive should be uncommented.
|
|
||||||
#authoritative;
|
|
||||||
|
|
||||||
# Use this to send dhcp log messages to a different log file (you also
|
|
||||||
# have to hack syslog.conf to complete the redirection).
|
|
||||||
#log-facility local7;
|
|
||||||
|
|
||||||
# No service will be given on this subnet, but declaring it helps the
|
|
||||||
# DHCP server to understand the network topology.
|
|
||||||
|
|
||||||
#subnet 10.152.187.0 netmask 255.255.255.0 {
|
|
||||||
#}
|
|
||||||
|
|
||||||
# This is a very basic subnet declaration.
|
|
||||||
|
|
||||||
subnet 192.168.2.0 netmask 255.255.255.0 {
|
|
||||||
range 192.168.2.10 192.168.2.110;
|
|
||||||
option routers 192.168.2.1;
|
|
||||||
option domain-name-servers 192.168.0.121;
|
|
||||||
option domain-name "sio-tg.lan";
|
|
||||||
}
|
|
||||||
host xp-2018{
|
|
||||||
hardware ethernet 08:00:27:77:70:0D;
|
|
||||||
fixed-address 192.168.2.111;
|
|
||||||
}
|
|
||||||
# This declaration allows BOOTP clients to get dynamic addresses,
|
|
||||||
#which we don't really recommend.
|
|
||||||
|
|
||||||
#subnet 10.254.239.32 netmask 255.255.255.224 {
|
|
||||||
# range dynamic-bootp 10.254.239.40 10.254.239.60;
|
|
||||||
# option broadcast-address 10.254.239.31;
|
|
||||||
# option routers rtr-239-32-1.example.org;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# A slightly different configuration for an internal subnet.
|
|
||||||
#subnet 10.5.5.0 netmask 255.255.255.224 {
|
|
||||||
# range 10.5.5.26 10.5.5.30;
|
|
||||||
# option domain-name-servers ns1.internal.example.org;
|
|
||||||
# option domain-name "internal.example.org";
|
|
||||||
# option routers 10.5.5.1;
|
|
||||||
# option broadcast-address 10.5.5.31;
|
|
||||||
# default-lease-time 600;
|
|
||||||
# max-lease-time 7200;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Hosts which require special configuration options can be listed in
|
|
||||||
# host statements. If no address is specified, the address will be
|
|
||||||
# allocated dynamically (if possible), but the host-specific information
|
|
||||||
# will still come from the host declaration.
|
|
||||||
|
|
||||||
#host passacaglia {
|
|
||||||
# hardware ethernet 0:0:c0:5d:bd:95;
|
|
||||||
# filename "vmunix.passacaglia";
|
|
||||||
# server-name "toccata.example.com";
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Fixed IP addresses can also be specified for hosts. These addresses
|
|
||||||
# should not also be listed as being available for dynamic assignment.
|
|
||||||
# Hosts for which fixed IP addresses have been specified can boot using
|
|
||||||
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
|
|
||||||
# be booted with DHCP, unless there is an address range on the subnet
|
|
||||||
# to which a BOOTP client is connected which has the dynamic-bootp flag
|
|
||||||
# set.
|
|
||||||
#host fantasia {
|
|
||||||
# hardware ethernet 08:00:07:26:c0:a5;
|
|
||||||
# fixed-address fantasia.example.com;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# You can declare a class of clients and then do address allocation
|
|
||||||
# based on that. The example below shows a case where all clients
|
|
||||||
# in a certain class get addresses on the 10.17.224/24 subnet, and all
|
|
||||||
# other clients get addresses on the 10.0.29/24 subnet.
|
|
||||||
|
|
||||||
#class "foo" {
|
|
||||||
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
|
|
||||||
#}
|
|
||||||
|
|
||||||
#shared-network 224-29 {
|
|
||||||
# subnet 10.17.224.0 netmask 255.255.255.0 {
|
|
||||||
# option routers rtr-224.example.org;
|
|
||||||
# }
|
|
||||||
# subnet 10.0.29.0 netmask 255.255.255.0 {
|
|
||||||
# option routers rtr-29.example.org;
|
|
||||||
# }
|
|
||||||
# pool {
|
|
||||||
# allow members of "foo";
|
|
||||||
# range 10.17.224.10 10.17.224.250;
|
|
||||||
# }
|
|
||||||
# pool {
|
|
||||||
# deny members of "foo";
|
|
||||||
# range 10.0.29.10 10.0.29.230;
|
|
||||||
# }
|
|
||||||
#}
|
|
@ -1,23 +0,0 @@
|
|||||||
|
|
||||||
# This file describes the network interfaces available on your system
|
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
|
||||||
|
|
||||||
source /etc/network/interfaces.d/*
|
|
||||||
|
|
||||||
# The loopback network interface
|
|
||||||
auto lo
|
|
||||||
iface lo inet loopback
|
|
||||||
|
|
||||||
# The primary network interface
|
|
||||||
allow-hotplug enp0s3
|
|
||||||
#iface enp0s3 inet dhcp
|
|
||||||
iface enp0s3 inet static
|
|
||||||
address 192.168.0.120/24
|
|
||||||
gateway 192.168.0.1
|
|
||||||
|
|
||||||
|
|
||||||
auto enp0s8
|
|
||||||
iface enp0s8 inet static
|
|
||||||
address 192.168.2.1/24
|
|
||||||
# gateway 192.168.0.1
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
;
|
|
||||||
; BIND data file for local loopback interface
|
|
||||||
;
|
|
||||||
$TTL 604800
|
|
||||||
@ IN SOA dns1-tg.sio-tg.lan. root.dns1-tg.sio-tg.lan. (
|
|
||||||
2 ; Serial
|
|
||||||
604800 ; Refresh
|
|
||||||
86400 ; Retry
|
|
||||||
2419200 ; Expire
|
|
||||||
604800 ) ; Negative Cache TTL
|
|
||||||
@ NS dns1-tg.sio-tg.lan.
|
|
||||||
dns2-tg.sio-tg.lan IN A 192.168.0.122
|
|
||||||
dns1-tg.sio-tg.lan. IN A 192.168.0.121
|
|
||||||
deb-dhcp-tg.sio-tg.lan. IN A 192.168.0.120
|
|
||||||
|
|
||||||
|
|
||||||
@ IN NS localhost.
|
|
||||||
@ IN A 127.0.0.1
|
|
||||||
@ IN A 192.168.0.120
|
|
@ -1,15 +0,0 @@
|
|||||||
;
|
|
||||||
; BIND data file for local loopback interface
|
|
||||||
;
|
|
||||||
$TTL 604800
|
|
||||||
@ IN SOA dns-tg.sio-tg.lan. root.dns-tg.sio-tg.lan. (
|
|
||||||
2 ; Serial
|
|
||||||
604800 ; Refresh
|
|
||||||
86400 ; Retry
|
|
||||||
2419200 ; Expire
|
|
||||||
604800 ) ; Negative Cache TTL
|
|
||||||
;
|
|
||||||
IN NS dns1-tg.sio.lan.
|
|
||||||
|
|
||||||
120 IN PTR deb-dhcp-tg.sio-tg.lan.
|
|
||||||
121 IN PTR dns1-tg.sio-tg.lan.
|
|
@ -1,16 +0,0 @@
|
|||||||
# This file describes the network interfaces available on your system
|
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
|
||||||
|
|
||||||
source /etc/network/interfaces.d/*
|
|
||||||
|
|
||||||
# The loopback network interface
|
|
||||||
auto lo
|
|
||||||
iface lo inet loopback
|
|
||||||
|
|
||||||
# The primary network interface
|
|
||||||
allow-hotplug enp0s3
|
|
||||||
#iface enp0s3 inet dhcp
|
|
||||||
iface enp0s3 inet static
|
|
||||||
address 192.168.0.121/24
|
|
||||||
gateway 192.168.0.1
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
// zone directe
|
|
||||||
zone "sio-tg.lan" {
|
|
||||||
type master;
|
|
||||||
file "/etc/bind/db.sio-tg.lan";
|
|
||||||
};
|
|
||||||
|
|
||||||
// zone inverse
|
|
||||||
zone "0.168.192.in-addr.arpa" {
|
|
||||||
type master;
|
|
||||||
notify no;
|
|
||||||
file "/etc/bind/db.sio-tg.lan.rev";
|
|
||||||
};
|
|
@ -1,4 +0,0 @@
|
|||||||
domain sio-tg.lan
|
|
||||||
search sio-tg.lan
|
|
||||||
nameserver 192.168.0.121
|
|
||||||
nameserver 10.121.38.8
|
|
@ -1,16 +0,0 @@
|
|||||||
# This file describes the network interfaces available on your system
|
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
|
||||||
|
|
||||||
source /etc/network/interfaces.d/*
|
|
||||||
|
|
||||||
# The loopback network interface
|
|
||||||
auto lo
|
|
||||||
iface lo inet loopback
|
|
||||||
|
|
||||||
# The primary network interface
|
|
||||||
allow-hotplug enp0s3
|
|
||||||
#iface enp0s3 inet dhcp
|
|
||||||
iface enp0s3 inet static
|
|
||||||
address 192.168.0.122/24
|
|
||||||
gateway 192.168.0.1
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
// zone directe
|
|
||||||
zone "sio-tg.lan" {
|
|
||||||
type slave;
|
|
||||||
file "/etc/bind/db.sio-tg.lan";
|
|
||||||
masters {192.168.0.121; };
|
|
||||||
masterfile-format text;
|
|
||||||
};
|
|
||||||
|
|
||||||
// zone inverse
|
|
||||||
zone "0.168.192.in-addr.arpa" {
|
|
||||||
type slave;
|
|
||||||
notify no;
|
|
||||||
file "/etc/bind/db.sio-tg.lan.rev";
|
|
||||||
masters { 192.168.0.121; };
|
|
||||||
};
|
|
@ -1,3 +0,0 @@
|
|||||||
domain sio-tg.lan
|
|
||||||
search sio-tg.lan
|
|
||||||
nameserver 127.0.0.1
|
|
@ -1,20 +0,0 @@
|
|||||||
# This file describes the network interfaces available on your system
|
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
|
||||||
|
|
||||||
source /etc/network/interfaces.d/*
|
|
||||||
|
|
||||||
# The loopback network interface
|
|
||||||
auto lo
|
|
||||||
iface lo inet loopback
|
|
||||||
|
|
||||||
# The primary network interface
|
|
||||||
allow-hotplug enp0s3
|
|
||||||
#iface enp0s3 inet dhcp
|
|
||||||
iface enp0s3 inet static
|
|
||||||
address 192.168.0.120/24
|
|
||||||
gateway 192.168.0.1
|
|
||||||
|
|
||||||
auto enp0s8
|
|
||||||
iface enp0s8 inet dhcp
|
|
||||||
# address 172.16.0.1/24
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
# This file describes the network interfaces available on your system
|
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
|
||||||
|
|
||||||
source /etc/network/interfaces.d/*
|
|
||||||
|
|
||||||
# The loopback network interface
|
|
||||||
auto lo
|
|
||||||
iface lo inet loopback
|
|
||||||
|
|
||||||
# The primary network interface
|
|
||||||
allow-hotplug enp0s3
|
|
||||||
iface enp0s3 inet dhcp
|
|
||||||
#iface enp0s3 inet static
|
|
||||||
# address 172.16.0.200/24
|
|
||||||
# gateway 172.16.0.1
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
//
|
|
||||||
// Do any local configuration here
|
|
||||||
//
|
|
||||||
|
|
||||||
// Consider adding the 1918 zones here, if they are not used in your
|
|
||||||
// organization
|
|
||||||
//include "/etc/bind/zones.rfc1918";
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
;
|
|
||||||
; BIND data file for local loopback interface
|
|
||||||
;
|
|
||||||
$TTL 604800
|
|
||||||
@ IN SOA srv-service.monlabo.lan. root.srv-service.monlabo.lan. (
|
|
||||||
2 ; Serial
|
|
||||||
604800 ; Refresh
|
|
||||||
86400 ; Retry
|
|
||||||
2419200 ; Expire
|
|
||||||
604800 ) ; Negative Cache TTL
|
|
||||||
|
|
||||||
|
|
||||||
NS srv-service.monlabo.lan.
|
|
||||||
|
|
||||||
|
|
||||||
srv-service A 172.16.0.254
|
|
||||||
srv-admin A 172.16.0.1
|
|
||||||
|
|
||||||
srvdns IN CNAME srv-service.monlabo.lan.
|
|
||||||
srvdns1 IN CNAME srv-service.monlabo.lan.
|
|
||||||
dns IN CNAME srv-service.monlabo.lan.
|
|
||||||
dns1 IN CNAME srv-service.monlabo.lan.
|
|
||||||
srvdhcp IN CNAME srv-service.monlabo.lan.
|
|
||||||
dhcp IN CNAME srv-service.monlabo.lan.
|
|
||||||
|
|
||||||
srvadmin IN CNAME srv-admin-tg.monlabo.lan.
|
|
||||||
router IN CNAME srv-admin-tg.monlabo.lan.
|
|
||||||
gateway IN CNAME srv-admin-tg.monlabo.lan.
|
|
@ -1,20 +0,0 @@
|
|||||||
;
|
|
||||||
; BIND data file for local loopback interface
|
|
||||||
;
|
|
||||||
$TTL 604800
|
|
||||||
@ IN SOA srv-service.monlabo.lan. root.srv-service.monlabo.lan. (
|
|
||||||
2 ; Serial
|
|
||||||
604800 ; Refresh
|
|
||||||
86400 ; Retry
|
|
||||||
2419200 ; Expire
|
|
||||||
604800 ) ; Negative Cache TTL
|
|
||||||
|
|
||||||
|
|
||||||
@ IN NS srv-service.monlabo.lan.
|
|
||||||
@ IN A 127.0.0.1
|
|
||||||
|
|
||||||
srv-service A 172.16.0.254
|
|
||||||
|
|
||||||
254 PTR srv-service.moblabo.lan
|
|
||||||
|
|
||||||
1 PTR srv-admin-tg.monlabo.lan
|
|
@ -1,118 +0,0 @@
|
|||||||
# dhcpd.conf
|
|
||||||
#
|
|
||||||
# Sample configuration file for ISC dhcpd
|
|
||||||
#
|
|
||||||
|
|
||||||
# option definitions common to all supported networks...
|
|
||||||
option domain-name "example.org";
|
|
||||||
option domain-name-servers ns1.example.org, ns2.example.org;
|
|
||||||
|
|
||||||
default-lease-time 600;
|
|
||||||
max-lease-time 7200;
|
|
||||||
|
|
||||||
# The ddns-updates-style parameter controls whether or not the server will
|
|
||||||
# attempt to do a DNS update when a lease is confirmed. We default to the
|
|
||||||
# behavior of the version 2 packages ('none', since DHCP v2 didn't
|
|
||||||
# have support for DDNS.)
|
|
||||||
ddns-update-style none;
|
|
||||||
|
|
||||||
# If this DHCP server is the official DHCP server for the local
|
|
||||||
# network, the authoritative directive should be uncommented.
|
|
||||||
#authoritative;
|
|
||||||
|
|
||||||
# Use this to send dhcp log messages to a different log file (you also
|
|
||||||
# have to hack syslog.conf to complete the redirection).
|
|
||||||
#log-facility local7;
|
|
||||||
|
|
||||||
# No service will be given on this subnet, but declaring it helps the
|
|
||||||
# DHCP server to understand the network topology.
|
|
||||||
|
|
||||||
#subnet 10.152.187.0 netmask 255.255.255.0 {
|
|
||||||
#}
|
|
||||||
|
|
||||||
# This is a very basic subnet declaration.
|
|
||||||
|
|
||||||
subnet 172.16.0.0 netmask 255.255.255.0 {
|
|
||||||
range 172.16.0.100 172.16.0.200;
|
|
||||||
option routers 172.16.0.1;
|
|
||||||
option domain-name "monlabo.lan";
|
|
||||||
option domain-name-servers 172.16.0.254;
|
|
||||||
}
|
|
||||||
host srv-admin{
|
|
||||||
hardware ethernet 08:00:27:ef:99:fa;
|
|
||||||
fixed-address 172.16.0.1;
|
|
||||||
}
|
|
||||||
|
|
||||||
host srv-dns2{
|
|
||||||
hardware ethernet 08:00:27:4a:ed:f7;
|
|
||||||
fixed-address 172.16.0.254;
|
|
||||||
}
|
|
||||||
|
|
||||||
# This declaration allows BOOTP clients to get dynamic addresses,
|
|
||||||
# which we don't really recommend.
|
|
||||||
|
|
||||||
#subnet 10.254.239.32 netmask 255.255.255.224 {
|
|
||||||
# range dynamic-bootp 10.254.239.40 10.254.239.60;
|
|
||||||
# option broadcast-address 10.254.239.31;
|
|
||||||
# option routers rtr-239-32-1.example.org;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# A slightly different configuration for an internal subnet.
|
|
||||||
#subnet 10.5.5.0 netmask 255.255.255.224 {
|
|
||||||
# range 10.5.5.26 10.5.5.30;
|
|
||||||
# option domain-name-servers ns1.internal.example.org;
|
|
||||||
# option domain-name "internal.example.org";
|
|
||||||
# option routers 10.5.5.1;
|
|
||||||
# option broadcast-address 10.5.5.31;
|
|
||||||
# default-lease-time 600;
|
|
||||||
# max-lease-time 7200;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Hosts which require special configuration options can be listed in
|
|
||||||
# host statements. If no address is specified, the address will be
|
|
||||||
# allocated dynamically (if possible), but the host-specific information
|
|
||||||
# will still come from the host declaration.
|
|
||||||
|
|
||||||
#host passacaglia {
|
|
||||||
# hardware ethernet 0:0:c0:5d:bd:95;
|
|
||||||
# filename "vmunix.passacaglia";
|
|
||||||
# server-name "toccata.example.com";
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Fixed IP addresses can also be specified for hosts. These addresses
|
|
||||||
# should not also be listed as being available for dynamic assignment.
|
|
||||||
# Hosts for which fixed IP addresses have been specified can boot using
|
|
||||||
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
|
|
||||||
# be booted with DHCP, unless there is an address range on the subnet
|
|
||||||
# to which a BOOTP client is connected which has the dynamic-bootp flag
|
|
||||||
# set.
|
|
||||||
#host fantasia {
|
|
||||||
# hardware ethernet 08:00:07:26:c0:a5;
|
|
||||||
# fixed-address fantasia.example.com;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# You can declare a class of clients and then do address allocation
|
|
||||||
# based on that. The example below shows a case where all clients
|
|
||||||
# in a certain class get addresses on the 10.17.224/24 subnet, and all
|
|
||||||
# other clients get addresses on the 10.0.29/24 subnet.
|
|
||||||
|
|
||||||
#class "foo" {
|
|
||||||
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
|
|
||||||
#}
|
|
||||||
|
|
||||||
#shared-network 224-29 {
|
|
||||||
# subnet 10.17.224.0 netmask 255.255.255.0 {
|
|
||||||
# option routers rtr-224.example.org;
|
|
||||||
# }
|
|
||||||
# subnet 10.0.29.0 netmask 255.255.255.0 {
|
|
||||||
# option routers rtr-29.example.org;
|
|
||||||
# }
|
|
||||||
# pool {
|
|
||||||
# allow members of "foo";
|
|
||||||
# range 10.17.224.10 10.17.224.250;
|
|
||||||
# }
|
|
||||||
# pool {
|
|
||||||
# deny members of "foo";
|
|
||||||
# range 10.0.29.10 10.0.29.230;
|
|
||||||
# }
|
|
||||||
#}
|
|
@ -1,16 +0,0 @@
|
|||||||
# This file describes the network interfaces available on your system
|
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
|
||||||
|
|
||||||
source /etc/network/interfaces.d/*
|
|
||||||
|
|
||||||
# The loopback network interface
|
|
||||||
auto lo
|
|
||||||
iface lo inet loopback
|
|
||||||
|
|
||||||
# The primary network interface
|
|
||||||
allow-hotplug enp0s3
|
|
||||||
#iface enp0s3 inet dhcp
|
|
||||||
iface enp0s3 inet static
|
|
||||||
address 172.16.0.254/24
|
|
||||||
gateway 172.16.0.1
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
// This is the primary configuration file for the BIND DNS server named.
|
|
||||||
//
|
|
||||||
// Please read /usr/share/doc/bind9/README.Debian for information on the
|
|
||||||
// structure of BIND configuration files in Debian, *BEFORE* you customize
|
|
||||||
// this configuration file.
|
|
||||||
//
|
|
||||||
// If you are just adding zones, please do that in /etc/bind/named.conf.local
|
|
||||||
|
|
||||||
include "/etc/bind/named.conf.options";
|
|
||||||
include "/etc/bind/named.conf.local";
|
|
||||||
include "/etc/bind/named.conf.default-zones";
|
|
@ -1,19 +0,0 @@
|
|||||||
//
|
|
||||||
// Do any local configuration here
|
|
||||||
//
|
|
||||||
|
|
||||||
// Consider adding the 1918 zones here, if they are not used in your
|
|
||||||
// organization
|
|
||||||
//include "/etc/bind/zones.rfc1918";
|
|
||||||
// zone directe
|
|
||||||
zone "monlabo.lan" {
|
|
||||||
type master;
|
|
||||||
file "/etc/bind/db.monlabo.lan";
|
|
||||||
};
|
|
||||||
|
|
||||||
// zone inverse
|
|
||||||
zone "0.16.172.in-addr.arpa" {
|
|
||||||
type master;
|
|
||||||
notify no;
|
|
||||||
file "/etc/bind/db.monlabo.lan.rev";
|
|
||||||
};
|
|
@ -1,30 +0,0 @@
|
|||||||
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,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
fichier=./Users.csv #Variable fichier qui stock le chemin du fichier
|
|
||||||
|
|
||||||
|
|
||||||
while read ligne #définit la variable "ligne" comme le contenu de la ligne du fichier en cours de lecture
|
|
||||||
do
|
|
||||||
#a chaque iteration on rentre dans la variable metier on isole le champ 5 de la ligne.
|
|
||||||
metier=$(echo $ligne | cut -d "," -f5)
|
|
||||||
if [[ $(grep $metier /etc/group) == "" ]] ; then
|
|
||||||
groupadd $metier
|
|
||||||
fi
|
|
||||||
#on cherche metier dans le repertoire des groupe
|
|
||||||
#grep $metier /etc/group
|
|
||||||
#on rentre les données du fichier avec done <
|
|
||||||
done < $fichier
|
|
@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
fichier_a_lire=./Users.csv #creation fichier a lire
|
|
||||||
fichier_a_ecrire=./logins.csv #creation fichier a lire + stockage dans cette variable
|
|
||||||
rm $fichier_a_ecrire 2> /dev/null #supprimer le fichier avant d'executer le script. / redirection des erreurs
|
|
||||||
touch $fichier_a_ecrire #creer le fichier a l'execution le script
|
|
||||||
|
|
||||||
while read line
|
|
||||||
do
|
|
||||||
aecrire=""
|
|
||||||
last_name=$(echo $line | cut -d "," -f2)
|
|
||||||
first_name=$(echo $line | cut -d "," -f1)
|
|
||||||
login=$(echo $first_name | cut -c1)$last_name
|
|
||||||
login=$(echo $login | tr [:upper:] [:lower:])
|
|
||||||
login=$(echo $login | tr -dc [:alnum:])
|
|
||||||
password=$(tr -dc '12345!@#$%^&*()_A-Z-a-z-0-9'</dev/urandom| head -c8)
|
|
||||||
group=$(echo $line | cut -d "," -f5)
|
|
||||||
|
|
||||||
|
|
||||||
aecrire="$login;$password;$first_name;$last_name;$group"
|
|
||||||
echo $aecrire >> $fichier_a_ecrire
|
|
||||||
done < $fichier_a_lire
|
|
@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
fichier_a_lire=./logins.csv
|
|
||||||
|
|
||||||
|
|
||||||
while read line
|
|
||||||
do
|
|
||||||
user=$(echo $line | cut -d ";" -f1)
|
|
||||||
useradd -m -s "/bin/bash" $user
|
|
||||||
|
|
||||||
group=$(echo $line | cut -d ";" -f5)
|
|
||||||
usermod -aG $group $user
|
|
||||||
|
|
||||||
passwd=$(echo $line | cut -d ";" -f2)
|
|
||||||
|
|
||||||
echo $user:$passwd | chpasswd
|
|
||||||
|
|
||||||
chown $user:$user /home/$user
|
|
||||||
done < $fichier_a_lire
|
|
@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
ip=$1
|
|
||||||
|
|
||||||
chemin=/root/deploy
|
|
||||||
user=root
|
|
||||||
|
|
||||||
ssh $user@$ip "mkdir $chemin" 2> /dev/null
|
|
||||||
|
|
||||||
scp createGroups.sh $user@$ip:$chemin
|
|
||||||
scp createUsers.sh $user@$ip:$chemin
|
|
||||||
scp logins.csv $user@$ip:$chemin
|
|
||||||
scp Users.csv $user@$ip:$chemin
|
|
||||||
|
|
||||||
ssh $user@$ip "cd $chemin ; bash createGroups.sh ; bash createUsers.sh"
|
|
||||||
|
|
||||||
|
|
||||||
ssh $user@$ip "rm -R $chemin"
|
|
@ -1,30 +0,0 @@
|
|||||||
eberthelmot;esBc1I^F;Ermengarde;Berthelmot;Accountant
|
|
||||||
kbunker;-barRdEy;Kassi;Bunker;Production
|
|
||||||
mmccallum;*HTbYCAK;Moises;McCallum;Production
|
|
||||||
plune;%bWyo_Sb;Patrizio;Lune;Accountant
|
|
||||||
beverix;waorB$Pf;Blanch;Everix;Accountant
|
|
||||||
skibbel;09JS7NTQ;Stafani;Kibbel;Production
|
|
||||||
imosdell;ZM9J^G(n;Ignacius;Mosdell;Management
|
|
||||||
jwallerbridge;q#SwzKZd;Jeana;Waller-Bridge;Management
|
|
||||||
edressel;PKLYzT6p;Elroy;Dressel;Production
|
|
||||||
tstrettell;x7D6zjD#;Thea;Strettell;Production
|
|
||||||
sinsoll;9zu5856m;Solomon;Insoll;Accountant
|
|
||||||
cfeedome;F@CQrTak;Carri;Feedome;Accountant
|
|
||||||
pchetwind;I%xQIWVK;Padraic;Chetwind;Management
|
|
||||||
sdugo;uRFMtM0K;Solly;D'Ugo;Production
|
|
||||||
kmaccostigan;4w5J7r(n;Konstanze;MacCostigan;Accountant
|
|
||||||
rpowlesland;(vzM5irO;Roxane;Powlesland;Management
|
|
||||||
okennealy;iMM$W0A@;Orelle;Kennealy;Production
|
|
||||||
ssoitoux;6NX^zZPy;Sukey;Soitoux;Production
|
|
||||||
nsyce;5f__@IKV;Nelli;Syce;Production
|
|
||||||
cshillam;ZK4pq!yg;Clarisse;Shillam;Production
|
|
||||||
cgueny;P#*e0UNs;Carin;Gueny;Management
|
|
||||||
driepel;sjECnfF);Donny;Riepel;Production
|
|
||||||
dralfe;cb4icl_6;Daniella;Ralfe;Production
|
|
||||||
lclynmans;WmITS!v6;Lexy;Clynmans;Production
|
|
||||||
gadamthwaite;CK!Fn1!!;Gardiner;Adamthwaite;Production
|
|
||||||
wlippett;HBRh6%MR;Woodman;Lippett;Production
|
|
||||||
nmunnion;4(LzplYR;Nadya;Munnion;Production
|
|
||||||
lhabershon;puQ#bc1X;Llewellyn;Habershon;Production
|
|
||||||
igreatrex;ij*LJVZh;Isaak;Greatrex;Production
|
|
||||||
dfrostdyke;fxm&GVn5;Darill;Frostdyke;Production
|
|
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
filename=squid.conf #nom du fichier à récuperer
|
|
||||||
filepath=/etc/squid #chemin
|
|
||||||
servicename=squid.service #nom du service
|
|
||||||
|
|
||||||
|
|
||||||
git pull #mise a jour du depot distant
|
|
||||||
|
|
||||||
sudo cp $filepath/$filename $filepath/$filename.old #sauvegarde en changeant le nom .old
|
|
||||||
|
|
||||||
sudo cp ./$filename $filepath/$filename
|
|
||||||
|
|
||||||
sudo systemctl restart $servicename #restart le service
|
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user