nethserver_201_cahier_08_self_service_password
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
nethserver_201_cahier_08_self_service_password [2019-12-22 16:36] – michelandre | nethserver_201_cahier_08_self_service_password [2025-01-12 19:30] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | \\ | ||
+ | {{ Images_Cahier-201-08-001.png? | ||
+ | \\ | ||
+ | ====== Description générale ====== | ||
+ | Le **Cahier-08** du "Cours NethServer-201" | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | [[nethserver_101_cahier_04_local_certificat_let_encrypt|Cahier-04]] | ||
+ | :** // | ||
+ | |||
+ | ===== Self Service Password ===== | ||
+ | |||
+ | //Self Service Password// est une application //PHP// qui permet aux utilisateurs de modifier leur mot de passe dans un annuaire //LDAP//. | ||
+ | |||
+ | L' | ||
+ | |||
+ | //Self Service Password// présente les caractéristiques suivantes: | ||
+ | |||
+ | - Mode LDAP | ||
+ | - Mode Active Directory | ||
+ | - Politique locale de mot de passe: | ||
+ | - Longueur minimum / maximum | ||
+ | - Caractères interdits | ||
+ | - Compteurs de caractères minuscules, majuscules, numériques ou spéciaux | ||
+ | - Contrôle de la réutilisation de l' | ||
+ | - Complexité //(classe différente de caractères)// | ||
+ | - Messages d'aide | ||
+ | - Réinitialisation par question | ||
+ | - Réinitialisation par jeton courriel //(jeton envoyé par messagerie électronique)// | ||
+ | - Réinitialisation par SMS //(via le service externe Email2SMS)// | ||
+ | - reCAPTCHA //(Google API)// | ||
+ | - Notification par courriel après changement de mot de passe | ||
+ | |||
+ | ===== Documentation SSP ===== | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | [[https:// | ||
+ | </ | ||
+ | |||
+ | ===== But de ce cahier ===== | ||
+ | |||
+ | Installer et configurer //Self Service Password// sur un //Serveur NethServer-7.6.1810// | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | {{ Images_Cahier-201-08-003.png? | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-08-004.png? | ||
+ | |||
+ | ===== Cours NethServer-101 ===== | ||
+ | |||
+ | Le //Cours NethServer-101//, | ||
+ | |||
+ | - [[nethserver_101_cahier_01_linux|Cahier-01]]: | ||
+ | - [[nethserver_101_cahier_02_installations_configurations_logiciels_prerequis|Cahier-02]]: | ||
+ | - [[nethserver_101_cahier_03_creation_un_serveur_virtuel|Cahier-03]]: | ||
+ | - [[nethserver_101_cahier_04_local_certificat_let_encrypt|Cahier-04]]: | ||
+ | - [[nethserver_101_cahier_05_vdsl_fqdn_internet_et_nethserver|Cahier-05]]: | ||
+ | // | ||
+ | - [[nethserver_101_cahier_06_nethserver_wordPress|Cahier-06]]: | ||
+ | - [[nethserver_101_cahier_07_nethserver_wordPress_wordfence|Cahier-07]]: | ||
+ | - [[nethserver_101_cahier_08_woocommerce_paypal_stripe|Cahier-08]]: | ||
+ | - [[nethserver_101_cahier_09_duplicator_migration|Cahier-09]]: | ||
+ | - [[nethserver_101_cahier_10_mandataire_inverse|Cahier-10]]: | ||
+ | - [[nethserver_101_cahier_11_nethserver_backuppc|Cahier-11]]: | ||
+ | |||
+ | ==== Cours NethServer-201 ==== | ||
+ | |||
+ | Le //Cours NethServer-201// | ||
+ | |||
+ | - [[nethserver_201_cahier_01_nethserver_et_dolibarr|Cahier-201-01]]: | ||
+ | - [[nethserver_201_cahier_02_odoo_12|Cahier-201-02]]: | ||
+ | - [[nethserver_201_cahier_03_mediawiki|Cahier-201-03]]: | ||
+ | - [[nethserver_201_cahier_04_dokuwiki|Cahier-201-04]]: | ||
+ | - [[nethserver_201_cahier_05_moodle|Cahier-201-05]]: | ||
+ | - [[nethserver_201_cahier_06_proxmox|Cahier-201-06]]: | ||
+ | - [[nethserver_201_cahier_07_flectra|Cahier-201-07]]: | ||
+ | - [[nethserver_201_cahier_08_self_service_password|Cahier-201-08]]: | ||
+ | |||
+ | ==== Cours NethServer-301 ==== | ||
+ | |||
+ | Le //Cours NethServer-301// | ||
+ | |||
+ | - [[nethserver_301_cahier_01_RSAT|Cahier-301-01]]: | ||
+ | - [[nethserver_301_cahier_02_active_directory|Cahier-301-02]]: | ||
+ | - [[nethserver_301_cahier_03_self_service_password_active_directory|Cahier-301-03]]: | ||
+ | - [[nethserver_301_cahier_04_ad_jonction_de_stations|Cahier-301-04]]: | ||
+ | |||
+ | ==== Logiciels ==== | ||
+ | |||
+ | Tous les logiciels nécessaires sont du domaine public ou LIBRE sous licence //GPL//; ils ne coûtent pas un sou. Le seul achat nécessaire est l' | ||
+ | |||
+ | ==== But final ==== | ||
+ | |||
+ | Après avoir suivi le //Cours NethServer-101//, | ||
+ | |||
+ | {{ NS-101_001_Diagramme.png? | ||
+ | |||
+ | ===== Particularités de ce document ===== | ||
+ | |||
+ | ==== Notes au lecteur ==== | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | ==== Conventions ==== | ||
+ | |||
+ | {{Images_icone-201-001_doigt.png? | ||
+ | {{Images_icone-201-002_Lumiere.png? | ||
+ | {{Images_icone-201-003_Note.png? | ||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | {{Images_icone-201-005_Non-termine.png? | ||
+ | {{Images_icone-201-006_Securite.png? | ||
+ | |||
+ | Toutes les commandes à la console ou à travers //PuTTY// sont précédées d'une invite qui est toujours présente. | ||
+ | |||
+ | < | ||
+ | [root@dorgee ~]# ping 10.10.10.75 -c1 | ||
+ | |||
+ | PING 10.10.10.75 (10.10.10.75) 56(84) bytes of data. | ||
+ | 64 bytes from 10.10.10.75: | ||
+ | |||
+ | --- 10.10.10.75 ping statistics --- | ||
+ | 1 packets transmitted, | ||
+ | rtt min/ | ||
+ | [root@dorgee ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | Commande à exécuter si ce n'est déjà fait. | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | Commande indiquée à titre d' | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ====== À savoir ====== | ||
+ | |||
+ | {{ Images_Cahier-201-08-005.png? | ||
+ | |||
+ | ===== Serveur NethServer-7.6.1810 ===== | ||
+ | |||
+ | Le //Serveur NethServer-7.6.1810// | ||
+ | |||
+ | ==== dorgee.micronator.org ==== | ||
+ | |||
+ | Serveur // | ||
+ | Serveur //DHCP// pour tout le réseau LOCAL // | ||
+ | |||
+ | ==== tchana.micronator-dev.org ==== | ||
+ | |||
+ | Serveur virtuel LOCAL sous // | ||
+ | |||
+ | ===== Poste de travail ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | ===== Éditeur de texte ===== | ||
+ | |||
+ | Ne modifiez pas les fichiers avec des éditeurs de documents tels // | ||
+ | |||
+ | ==== Notepad++ ==== | ||
+ | |||
+ | Voir le [[nethserver_101_cahier_02_installations_configurations_logiciels_prerequis|Cahier-02]]: | ||
+ | |||
+ | ==== Description ==== | ||
+ | |||
+ | // | ||
+ | // | ||
+ | |||
+ | //Site de téléchargement:// | ||
+ | |||
+ | ==== Documentation ==== | ||
+ | |||
+ | //Guide pratique// //(1er août 2013)//: [[http:// | ||
+ | // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Préparation de l' | ||
+ | |||
+ | ===== Configuration du poste de travail ===== | ||
+ | |||
+ | Voir la section //À savoir// du | ||
+ | [[nethserver_101_cahier_03_creation_un_serveur_virtuel# | ||
+ | : //Création d'un Serveur NethServer virtuel// du "Cours NethServer-101" | ||
+ | |||
+ | <WRAP column 61%> | ||
+ | ==== Vérification ==== | ||
+ | |||
+ | **Centre Réseau et partage -> Modifier les paramètres de la carte ->** clac //(clic droit)// sur la carte Éthernet **-> Statut -> Détails**. | ||
+ | |||
+ | ● Nos deux adresses //IP// et nos deux passerelles son présentes. | ||
+ | |||
+ | ● **Fermer** toutes les fenêtre. | ||
+ | </ | ||
+ | <WRAP column 31%> | ||
+ | |{{ Images_Cahier-201-02-007.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | '' | ||
+ | |||
+ | Les //CNAME// de notre //Serveur NethServer// | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-02-008.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Installation d'un Serveur NethServer ===== | ||
+ | |||
+ | Voir le [[nethserver_101_cahier_03_creation_un_serveur_virtuel|Cahier-03]]: | ||
+ | |||
+ | Pour un serveur virtuel de test, prendre un minimum de //8 Go// dynamiquement alloué __pour le disque principal__. | ||
+ | |||
+ | ==== Mise à jour du Serveur ==== | ||
+ | |||
+ | Avant de commencer quoi que ce soit, il est toujours préférable de mettre à jour le //Serveur NethServer// | ||
+ | |||
+ | ==== Fail2ban & ClamAV ==== | ||
+ | |||
+ | Il est fortement recommandé d' | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Vérification du certificat Let's Encrypt ===== | ||
+ | |||
+ | Pour l' | ||
+ | |||
+ | <WRAP column 52%> | ||
+ | On se rend à **https:// | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | On clique le cadenas pour afficher les informations de la connexion, puis on clique l' | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-201-08-006.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Plus d' | ||
+ | |{{ Images_Cahier-201-08-007.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | Onglet **Sécurité -> Afficher le certificat**. | ||
+ | |{{ Images_Cahier-201-08-008.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-08-009.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-08-010.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Le certificat // | ||
+ | \\ | ||
+ | |||
+ | ===== interface Web NethServer ===== | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | Depuis le poste de travail, sur le réseau LOCAL // | ||
+ | |||
+ | ==== Login ==== | ||
+ | |||
+ | Lorsque vous parvenez à l'// | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | |{{ Images_Cahier-201-02-009.png? | ||
+ | </ | ||
+ | <WRAP column 72%> | ||
+ | |{{ Images_Cahier-201-08-011.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | <WRAP column 55%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-02-011.png? | ||
+ | </ | ||
+ | <WRAP column 37%> | ||
+ | **Historique -> Supprimer l' | ||
+ | |{{ Images_Cahier-201-02-012.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-02-013.png? | ||
+ | ==== Fournisseur des comptes ==== | ||
+ | |||
+ | **Configuration -> Fournisseur des comptes**. | ||
+ | |||
+ | **//LDAP local//** est notre fournisseur de comptes. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-07-004.png? | ||
+ | ==== FQDN du serveur ==== | ||
+ | |||
+ | **Configuration -> DNS ->** onglet **Hôtes**. | ||
+ | |||
+ | Le //FQDN// du serveur: // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-02-015.png? | ||
+ | ==== Nom du serveur ==== | ||
+ | |||
+ | **Configuration -> Nom du serveur**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-02-016.png? | ||
+ | ==== Paramètres d' | ||
+ | |||
+ | **Sécurité -> SSH**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-08-012.png? | ||
+ | ==== TLS policy ==== | ||
+ | |||
+ | **Sécurité | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-02-017.png? | ||
+ | ==== FTP ==== | ||
+ | |||
+ | **Configuration -> FTP ->** onglet **Configurer**. | ||
+ | |||
+ | {{Images_icone-201-001_doigt.png? | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-02-018.png? | ||
+ | ==== Serveurs DNS ==== | ||
+ | |||
+ | **Configuration -> Réseau ->** onglet **Serveur DNS**. | ||
+ | |||
+ | Le serveur //DNS// secondaire peut être //8.8.8.8// ou // | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Ouverture d'une session PuTTY ===== | ||
+ | |||
+ | Les paramètres du serveur sont définis correctement et on peut utiliser //PuTTY// pour s'y loguer. | ||
+ | |||
+ | Voir //PuTTY// dans le | ||
+ | [[nethserver_101_cahier_02_installations_configurations_logiciels_prerequis# | ||
+ | : // | ||
+ | |||
+ | On se logue en tant que l' | ||
+ | |||
+ | < | ||
+ | login as: root | ||
+ | root@10.10.10.75' | ||
+ | Last login: Sat Oct 19 15:58:02 2019 from 10.10.10.81 | ||
+ | |||
+ | ************ Welcome to NethServer ************ | ||
+ | |||
+ | This is a NethServer installation. | ||
+ | |||
+ | Before editing configuration files, be aware | ||
+ | of the automatic events and templates system. | ||
+ | |||
+ | |||
+ | http:// | ||
+ | |||
+ | *********************************************** | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Adresse IP ==== | ||
+ | |||
+ | On vérifie les adresses //IP// du serveur. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ifconfig | ||
+ | |||
+ | enp0s3: flags=4163< | ||
+ | inet 10.10.10.75 | ||
+ | inet6 fe80:: | ||
+ | ether 08: | ||
+ | RX packets 1237 bytes 147855 (144.3 KiB) | ||
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 1471 bytes 1350638 (1.2 MiB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | |||
+ | enp0s8: flags=4163< | ||
+ | inet 192.168.1.75 | ||
+ | inet6 fe80:: | ||
+ | ether 08: | ||
+ | RX packets 3789 bytes 1613677 (1.5 MiB) | ||
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 4134 bytes 371155 (362.4 KiB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | |||
+ | lo: flags=73< | ||
+ | inet 127.0.0.1 | ||
+ | inet6 ::1 prefixlen 128 scopeid 0x10< | ||
+ | loop txqueuelen 1000 (Local Loopback) | ||
+ | RX packets 392 bytes 42659 (41.6 KiB) | ||
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 392 bytes 42659 (41.6 KiB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Fail2ban ==== | ||
+ | |||
+ | On vérifie que le pare-feu // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep -i fail2ban | ||
+ | |||
+ | fail2ban-firewalld-0.9.7-1.el7.noarch | ||
+ | fail2ban-server-0.9.7-1.el7.noarch | ||
+ | fail2ban-0.9.7-1.el7.noarch | ||
+ | fail2ban-sendmail-0.9.7-1.el7.noarch | ||
+ | fail2ban-shorewall-0.9.7-1.el7.noarch | ||
+ | nethserver-fail2ban-1.1.10-1.ns7.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie que // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ps aux | grep -i fail2ban | ||
+ | |||
+ | root 2305 2.0 0.5 1746708 20008 ? | ||
+ | root 2969 0.0 0.0 112708 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== ClamAV ==== | ||
+ | |||
+ | Par défaut //ClamAV// est installé, mais partiellement, | ||
+ | |||
+ | Dans le | ||
+ | [[nethserver_101_cahier_03_creation_un_serveur_virtuel# | ||
+ | : //Création d'un Serveur NethServer virtuel// du "Cours NethServer-101", | ||
+ | |||
+ | On vérifie que l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep -i clamav | ||
+ | |||
+ | clamav-filesystem-0.101.4-1.el7.noarch | ||
+ | clamav-lib-0.101.4-1.el7.x86_64 | ||
+ | clamav-0.101.4-1.el7.x86_64 | ||
+ | clamav-update-0.101.4-1.el7.x86_64 | ||
+ | clamav-unofficial-sigs-5.6.2-7.el7.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-201-02-019.png? | ||
+ | **Configuration -> Scanner Antivirus ->** onglet **Clamscan**. | ||
+ | |||
+ | //ClamAV// lancera un balayage complet du système à **// | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Utilisateurs ===== | ||
+ | |||
+ | {{ Images_Cahier-201-02-020.png? | ||
+ | ==== Utilisateur michelandre ==== | ||
+ | |||
+ | **Gestion -> Utilisateurs et groupes ->** onglet **Utilisateurs**. | ||
+ | |||
+ | L' | ||
+ | [[nethserver_101_cahier_03_creation_un_serveur_virtuel# | ||
+ | : //Création d'un Serveur NethServer virtuel// du "Cours NethServer-101" | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-08-013.png? | ||
+ | ==== Autres utilisateurs ==== | ||
+ | |||
+ | Nous créons deux autres utilisateurs: | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-08-014.png? | ||
+ | ==== Groupes ==== | ||
+ | |||
+ | Nous créons un nouveau groupe **__grp-utilisateurs__** et y insérons **__toto__** et **__titi__**. | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ==== Répertoires personnels ==== | ||
+ | |||
+ | À la connexion //PuTTY//, on se substitue à **__toto__**, | ||
+ | |||
+ | Ces connexions auront comme principal avantage de créer le répertoire personnel de **__toto__**, | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# su - toto | ||
+ | |||
+ | Creating home directory for toto@micronator-dev.org. | ||
+ | [toto@micronator-dev.org@tchana ~]$ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [toto@micronator-dev.org@tchana ~]$ exit | ||
+ | |||
+ | logout | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# su - titi | ||
+ | |||
+ | Creating home directory for titi@micronator-dev.org. | ||
+ | [titi@micronator-dev.org@tchana ~]$ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [titi@micronator-dev.org@tchana ~]$ exit | ||
+ | |||
+ | logout | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# su - michelandre | ||
+ | |||
+ | Creating home directory for michelandre@micronator-dev.org. | ||
+ | [michelandre@micronator-dev.org@tchana ~]$ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [michelandre@micronator-dev.org@tchana ~]$ exit | ||
+ | |||
+ | logout | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie la création des répertoires personnels. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | total 0 | ||
+ | 0 drwx------ 2 michelandre@micronator-dev.org locals@micronator-dev.org 83 20 oct. 18:02 michelandre | ||
+ | 0 drwx------ 2 titi@micronator-dev.org | ||
+ | 0 drwx------ 2 toto@micronator-dev.org | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Répertoires de courriels ==== | ||
+ | |||
+ | On se rends à https:// | ||
+ | |||
+ | Après s' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-08-015.png? | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-201-08-016.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | On vérifie la réception des courriels par **__michelandre__**. | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-201-08-017.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | On vérifie la création des répertoires courriels. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | total 4 | ||
+ | 0 drwx------ 3 vmail vmail 21 19 avril 2019 admin@micronator-dev.org | ||
+ | 0 drwx------ 3 vmail vmail 21 19 avril 2019 michelandre@micronator-dev.org | ||
+ | 0 drwx------ 3 vmail vmail 21 8 janv. 2019 root | ||
+ | 4 -rw------- 1 vmail vmail 73 14 oct. 11:35 shared-mailboxes.db | ||
+ | 0 drwx------ 3 vmail vmail 21 14 oct. 17:20 titi@micronator-dev.org | ||
+ | 0 drwx------ 3 vmail vmail 21 14 oct. 17:19 toto@micronator-dev.org | ||
+ | 0 drwx------ 3 vmail vmail 21 8 janv. 2019 vmail | ||
+ | 0 drwx------ 3 vmail vmail 21 19 avril 2019 vmail@micronator-dev.org | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Vérification de la configuration du réseau ===== | ||
+ | |||
+ | **Configuration | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-08-018.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-08-019.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-08-020.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Collection PHP ===== | ||
+ | |||
+ | Version //PHP// actuelle pour notre //Serveur NethServer-7.6-1810// | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# php --version | ||
+ | |||
+ | PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51) | ||
+ | Copyright (c) 1997-2013 The PHP Group | ||
+ | Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Comme on le voit, notre version //5.4.16// de //PHP// est légèrement vieillotte. | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | ==== Collections de logiciels ==== | ||
+ | |||
+ | {{Images_icone-201-001_doigt.png? | ||
+ | |||
+ | Tous les //RPM// des // | ||
+ | |||
+ | === PHP === | ||
+ | Le but de la // | ||
+ | |||
+ | ==== Prérequis pour l' | ||
+ | |||
+ | // | ||
+ | |||
+ | Il faut installer les référentiels //stephdl// et //remi// pour pouvoir installer la // | ||
+ | |||
+ | === Référentiel stephdl === | ||
+ | |||
+ | // | ||
+ | |||
+ | On vérifie si le référentiel //stephdl// est déjà installé. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep nethserver-stephdl | ||
+ | |||
+ | nethserver-stephdl-1.0.8-1.ns7.sdl.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Si ce n'est déjà fait, on installe ce référentiel. | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# yum install -y http:// | ||
+ | |||
+ | ... | ||
+ | Transaction Summary | ||
+ | ============================================================================================ | ||
+ | Install | ||
+ | |||
+ | Total size: 40 k | ||
+ | Installed size: 40 k | ||
+ | ... | ||
+ | Installed: | ||
+ | nethserver-stephdl-1.0.8-1.ns7.sdl.noarch | ||
+ | |||
+ | Complete! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Vérification. | ||
+ | |||
+ | <WRAP box round> | ||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep stephdl | ||
+ | |||
+ | nethserver-stephdl-1.0.8-1.ns7.sdl.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | === Référentiel remi === | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum install -y http:// | ||
+ | |||
+ | ... | ||
+ | Transaction Summary | ||
+ | ============================================================================================ | ||
+ | Install | ||
+ | |||
+ | Total size: 23 k | ||
+ | Installed size: 23 k | ||
+ | ... | ||
+ | Installed: | ||
+ | remi-release.noarch 0: | ||
+ | |||
+ | Complete! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [[root@tchana ~]# rpm -qa | grep remi | ||
+ | |||
+ | remi-release-7.7-1.el7.remi.noarch | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ==== Installation de la Collection PHP ==== | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum install -y nethserver-php-scl --enablerepo=stephdl | ||
+ | |||
+ | ... | ||
+ | Résumé de la transaction | ||
+ | ============================================================================================ | ||
+ | Installation | ||
+ | |||
+ | Taille totale des téléchargements : 57 M | ||
+ | Taille d' | ||
+ | ... | ||
+ | Installation : scl-utils-20130529-19.el7.x86_64 | ||
+ | ... | ||
+ | Vérification : php71-php-common-7.1.33-1.el7.remi.x86_64 | ||
+ | ... | ||
+ | Installé : | ||
+ | nethserver-php-scl.x86_64 0: | ||
+ | |||
+ | Dépendances installées : | ||
+ | enchant.x86_64 1: | ||
+ | ... | ||
+ | tcl.x86_64 1: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Mise à jour de la Collection ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | Exemple de la mise à jour de la Collection PHP. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum update -y nethserver-php-scl --enablerepo=stephdl | ||
+ | |||
+ | Modules complémentaires chargés : changelog, fastestmirror, | ||
+ | Loading mirror speeds from cached hostfile | ||
+ | * epel: epel.mirror.constant.com | ||
+ | * remi-safe: mirror.team-cymru.com | ||
+ | No packages marked for update | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | ==== Usage ==== | ||
+ | |||
+ | Normalement, | ||
+ | |||
+ | Les réglages sont répartis à deux endroits. | ||
+ | |||
+ | - **Gestion -> Hôtes virtuels**.\\ | ||
+ | À cette page, après avoir créé un hôte virtuel, vous pouvez choisir la version que vous utiliserez pour l'// | ||
+ | \\ | ||
+ | |||
+ | - **Configuration -> Paramètres PHP**.\\ | ||
+ | À cette page, vous pouvez choisir la version //PHP// que vous souhaitez utiliser __pour l’ensemble du serveur__.\\ Lorsqu'// | ||
+ | \\ | ||
+ | |||
+ | ==== Répertoire d' | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | On vérifie la présence du référentiel // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum repolist | grep remi | ||
+ | |||
+ | * remi-safe: mirror.team-cymru.com | ||
+ | remi-safe | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls /opt | ||
+ | |||
+ | total 0 | ||
+ | 0 drwxr-xr-x. 7 root root 81 4 janv. 2019 puppetlabs | ||
+ | 0 drwxr-xr-x | ||
+ | 0 drwxr-xr-x | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On affiche le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls /opt/remi | ||
+ | |||
+ | total 0 | ||
+ | 0 dr-xr-xr-x 3 root root 32 16 nov. 13:57 php56 | ||
+ | 0 dr-xr-xr-x 3 root root 32 16 nov. 13:57 php70 | ||
+ | 0 dr-xr-xr-x 3 root root 32 16 nov. 13:58 php71 | ||
+ | 0 dr-xr-xr-x 3 root root 32 16 nov. 13:57 php72 | ||
+ | 0 dr-xr-xr-x 3 root root 32 16 nov. 13:58 php73 | ||
+ | 0 dr-xr-xr-x 3 root root 32 16 nov. 13:57 php74 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== PHP72 par défaut après une connexion à la ligne de commande ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | On crée le fichier d' | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | #!/bin/bash | ||
+ | source / | ||
+ | if [[ " | ||
+ | src=" | ||
+ | pkgs=(${src// | ||
+ | uniq=($(printf " | ||
+ | export X_SCLS=" | ||
+ | fi | ||
+ | EOT | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On rend le fichier exécutable. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chmod +x / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 4 -rwxr-xr-x 1 root root 215 16 nov. 14:03 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | === Vérification si PHP72 est le défaut=== | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | |||
+ | On vérifie l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rpm -qa | grep scl- | ||
+ | |||
+ | centos-release-scl-rh-2-3.el7.centos.noarch | ||
+ | centos-release-scl-2-3.el7.centos.noarch | ||
+ | scl-utils-20130529-19.el7.x86_64 | ||
+ | nethserver-php-scl-1.2.8-1.ns7.sdl.x86_64 | ||
+ | </ | ||
+ | |||
+ | // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# scl -l | ||
+ | |||
+ | php56 | ||
+ | php70 | ||
+ | php71 | ||
+ | php72 | ||
+ | php73 | ||
+ | php74 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Quel est le //PHP// par défaut? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# which php | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Quelle est sa version? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# php --version | ||
+ | |||
+ | PHP 7.2.24 (cli) (built: Oct 22 2019 11:28:13) ( NTS ) | ||
+ | Copyright (c) 1997-2018 The PHP Group | ||
+ | Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies | ||
+ | with Zend OPcache v7.2.24, Copyright (c) 1999-2018, by Zend Technologies | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Notre fichier '' | ||
+ | \\ | ||
+ | |||
+ | === Sauvegarde du fichier d' | ||
+ | |||
+ | On vérifie si le nom du fichier ''/ | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | |||
+ | < | ||
+ | NouvelleInclusion="/ | ||
+ | if grep -Fxq " | ||
+ | then | ||
+ | # L' | ||
+ | echo -e "\nLe fichier custom.include contient déjà l' | ||
+ | else | ||
+ | # L' | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | fi | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Ci-dessus, il n'y a pas de ligne vide avant ''/ | ||
+ | \\ | ||
+ | |||
+ | ==== Mise à jour de la Collection ==== | ||
+ | |||
+ | // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum update -y nethserver-php-scl --enablerepo=stephdl | ||
+ | |||
+ | Loaded plugins: changelog, fastestmirror, | ||
+ | Loading mirror speeds from cached hostfile | ||
+ | * ce-base: it.centos.contactlab.it | ||
+ | * ce-extras: it.centos.contactlab.it | ||
+ | * ce-updates: it.centos.contactlab.it | ||
+ | * epel: epel.mirror.constant.com | ||
+ | * nethforge: mirror.nethserver.org | ||
+ | * nethserver-base: | ||
+ | * nethserver-updates: | ||
+ | * remi-safe: rpms.remirepo.net | ||
+ | No packages marked for update | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | {{Images_icone-201-003_Note.png? | ||
+ | \\ | ||
+ | |||
+ | ==== Ajustement des paramètres PHP ==== | ||
+ | |||
+ | Les valeurs de certains paramètres de //PHP// ne sont pas suffisants pour certains ajouts. Ces paramètres sont: **'' | ||
+ | |||
+ | Affichage des paramètres par défaut. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# config show php72 | ||
+ | |||
+ | php72=configuration | ||
+ | AllowUrlFopen=On | ||
+ | ExposePhp=0 | ||
+ | MaxExecutionTime=30 | ||
+ | MaxFileUpload=20 | ||
+ | MaxInputTime=60 | ||
+ | MemoryLimit=128 | ||
+ | PostMaxSize=20 | ||
+ | UploadMaxFilesize=10 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-001_doigt.png? | ||
+ | \\ | ||
+ | |||
+ | Ci-dessous, le caractère <wrap em>></ | ||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | \\ | ||
+ | |||
+ | === MemoryLimit === | ||
+ | |||
+ | Chaque fois qu'un client fait une requête au serveur Web, //PHP// génère un processus //PHP//. Le travail de ce processus est de générer du code HTML qu'il envoie au client. Le processus fournit un temps d' | ||
+ | |||
+ | === PostMaxSize === | ||
+ | |||
+ | Le paramètre '' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | === UploadMaxFilesize === | ||
+ | |||
+ | Pour certaines extensions, telles qu' | ||
+ | La limite ci-contre, __est celle de WordPress__. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-201-02-200.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | |||
+ | === Version PHP par défaut === | ||
+ | |||
+ | On définit la version //PHP// par défaut pour //Apache//. | ||
+ | |||
+ | **Configuration -> Paramètres PHP ->** onglet **Version PHP Apache ->** cliquer | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-201-08-021.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | === Ajustements des paramètres de la version PHP-7.2 === | ||
+ | |||
+ | Onglet **Php V7.2 SCL**\\ | ||
+ | Ajuster tel que ci-contre //(250M - 100M - 75M)// | ||
+ | **-> SOUMETTRE**. | ||
+ | |||
+ | {{Images_icone-201-006_Securite.png? | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-201-08-022.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Onglet **Version par défaut de PHP**\\ | ||
+ | Ajuster tel que ci-contre //(250M - 75M - 75M)// | ||
+ | **-> SOUMETTRE**.\\ | ||
+ | |||
+ | {{Images_icone-201-006_Securite.png? | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-201-08-023.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Vérifications à la ligne de commande === | ||
+ | |||
+ | == MemoryLimit == | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | memory_limit | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | == PostMaxSize == | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | post_max_size | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | == UploadMaxFilesize == | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | upload_max_filesize | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-004_Triangle.png? | ||
+ | \\ | ||
+ | |||
+ | On vérifie la configuration de // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# config show php72 | ||
+ | |||
+ | php72=configuration | ||
+ | AllowUrlFopen=Off | ||
+ | ExposePhp=0 | ||
+ | MaxExecutionTime=30 | ||
+ | MaxFileUpload=20 | ||
+ | MaxInputTime=60 | ||
+ | MemoryLimit=250 | ||
+ | PostMaxSize=100 | ||
+ | UploadMaxFilesize=75 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Installation du module PHP pour AD ==== | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# yum install -y nethserver-rh-php72-php-fpm | ||
+ | |||
+ | ... | ||
+ | Le paquet php72-php-ldap-7.2.24-1.el7.remi.x86_64 est déjà installé dans sa dernière version | ||
+ | Le paquet php-mbstring-5.4.16-46.el7.x86_64 est déjà installé dans sa dernière version | ||
+ | ... | ||
+ | Résumé de la transaction | ||
+ | ============================================================================================ | ||
+ | Installation | ||
+ | |||
+ | Taille totale des téléchargements : 6.9 M | ||
+ | Taille d' | ||
+ | ... | ||
+ | Installé : | ||
+ | nethserver-rh-php72-php-fpm.noarch 0: | ||
+ | |||
+ | Dépendances installées : | ||
+ | rh-php72.x86_64 0: | ||
+ | rh-php72-php-common.x86_64 0: | ||
+ | rh-php72-php-json.x86_64 0: | ||
+ | rh-php72-php-process.x86_64 0: | ||
+ | rh-php72-php-zip.x86_64 0: | ||
+ | |||
+ | Terminé ! | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== phpinfo.php ==== | ||
+ | |||
+ | On crée un fichier qui affichera toutes les information de //PHP//. \\ | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | <?php | ||
+ | // Affiche toutes les informations de PHP, par défaut INFO_ALL | ||
+ | phpinfo(); | ||
+ | ?> | ||
+ | EOT | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On ajuste le // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown apache: | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | 4 -rw-r--r-- 1 apache apache 84 16 nov. 14:16 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | On lance le fichier: https:// | ||
+ | |||
+ | On examine la section //Core// qui affiche qu'on utilise la version PHP-7.2.24. | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-201-08-024.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Le test est terminé, on supprime le fichier. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rm -rf / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie la suppression. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | ls: impossible d' | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Installation de Self Service Password ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | On veut que les utilisateurs puissent changer leur mot de passe sans utiliser un //VPN// et sans exposer le gestionnaire Web du serveur à l' | ||
+ | |||
+ | ===== Téléchargement ===== | ||
+ | |||
+ | {{ Images_Cahier-201-08-025.png? | ||
+ | //Lien de téléchargement:// | ||
+ | |||
+ | On téléverse le fichier **ltb-project-self-service-password-1.3.tar.gz** dans le répertoire **/root**. | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | On vérifie le téléchargement du fichier. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als ltb-project-self-service-password-1.3.tar.gz | ||
+ | |||
+ | 1704 -rw-r--r-- 1 root root 1744823 Nov 4 16:15 ltb-project-self-service-password-1.3.tar.gz | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On crée un répertoire pour //SSP//. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# mkdir / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On extraie l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# tar -zxvf / | ||
+ | |||
+ | ltb-project-self-service-password-1.3/ | ||
+ | ... | ||
+ | ltb-project-self-service-password-1.3/ | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste **__R__**écursivement le // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown -R apache: | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie le répertoire de //SSP//. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -lsd / | ||
+ | |||
+ | 0 drwxr-xr-x 11 apache apache 182 16 nov. 14:23 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Par sécurité, on enlève **__R__**écursivement tous les droits à " | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chmod -R o-rwx / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 68 | ||
+ | 0 drwxr-xr-x | ||
+ | 4 drwxr-xr-x. 119 root | ||
+ | 0 drwxrwx--- | ||
+ | 0 drwxrwx--- | ||
+ | 4 drwxrwx--- | ||
+ | 0 drwxrwx--- | ||
+ | 12 -rw-rw---- | ||
+ | 0 drwxrwx--- | ||
+ | 4 drwxrwx--- | ||
+ | 0 drwxrwx--- | ||
+ | 36 -rw-rw---- | ||
+ | 4 -rw-rw---- | ||
+ | 0 drwxrwx--- | ||
+ | 4 -rw-rw---- | ||
+ | 0 drwxrwx--- | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Ajout d'un fichier de configuration à Apache ===== | ||
+ | |||
+ | On ajoute un fichier de configuration **self-service-passord.conf** à //Apache// qui intégrera //SSP//. | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | Alias /ssp / | ||
+ | |||
+ | < | ||
+ | AllowOverride all | ||
+ | < | ||
+ | Require all granted | ||
+ | </ | ||
+ | < | ||
+ | Order Deny,Allow | ||
+ | Allow from all | ||
+ | </ | ||
+ | DirectoryIndex index.php | ||
+ | AddDefaultCharset UTF-8 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | AllowOverride None | ||
+ | < | ||
+ | Require all denied | ||
+ | </ | ||
+ | < | ||
+ | Order Deny,Allow | ||
+ | Deny from all | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | Alias /ssp / | ||
+ | |||
+ | < | ||
+ | AllowOverride all | ||
+ | < | ||
+ | Require all granted | ||
+ | </ | ||
+ | < | ||
+ | Order Deny,Allow | ||
+ | Allow from all | ||
+ | </ | ||
+ | DirectoryIndex index.php | ||
+ | AddDefaultCharset UTF-8 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | AllowOverride None | ||
+ | < | ||
+ | Require all denied | ||
+ | </ | ||
+ | < | ||
+ | Order Deny,Allow | ||
+ | Deny from all | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On vérifie la syntaxe de notre fichier de configuration. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# apachectl configtest | ||
+ | |||
+ | Syntax OK | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On redémarre //Apache//. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# systemctl restart httpd | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Vérification de l' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | On vérifie le fonctionnement de //SSP// en se rendant à l'// | ||
+ | |||
+ | | ||
+ | |||
+ | //SSP// fonctionne correctement. | ||
+ | |||
+ | On peut procéder à sa configuration. | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-201-08-026.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Configuration de SSP ====== | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | Tous les paramètres de configuration de //SSP// sont contenus dans le fichier ''/ | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | |||
+ | Les paramètres spécifiés dans le fichier '' | ||
+ | |||
+ | ===== Fichier config.inc.local.php ===== | ||
+ | |||
+ | On crée le fichier de configuration locale. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# touch / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On change le // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown apache: | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste les droits. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chmod 440 / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | 0 -r--r----- 1 apache apache 0 16 nov. 15:23 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Paramètres LDAP ==== | ||
+ | |||
+ | On affiche les paramètres //LDAP//. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | # ================= DO NOT MODIFY THIS FILE ================= | ||
+ | # | ||
+ | # Manual changes will be lost when this file is regenerated. | ||
+ | # | ||
+ | # Please read the developer' | ||
+ | # at NethServer official site: https:// | ||
+ | # | ||
+ | # | ||
+ | |||
+ | |||
+ | [defaults] | ||
+ | modules = ldap | ||
+ | crypt_style = sha512 | ||
+ | create_modules = ldap | ||
+ | |||
+ | [groupdefaults] | ||
+ | LU_GROUPNAME = %n | ||
+ | |||
+ | [import] | ||
+ | login_defs = / | ||
+ | default_useradd = / | ||
+ | |||
+ | [ldap] | ||
+ | userBranch = ou=People | ||
+ | password = kN_7IjCs35FxCrGn | ||
+ | basedn = dc=directory, | ||
+ | groupBranch = ou=Groups | ||
+ | binddn = cn=libuser, | ||
+ | bindtype = simple | ||
+ | server = ldap:// | ||
+ | |||
+ | [userdefaults] | ||
+ | LU_GIDNUMBER = %u | ||
+ | LU_USERNAME = %n | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Nous utiliserons les paramètres sous //[ldap]// pour la configuration du fichier '' | ||
+ | |||
+ | ==== Logo ==== | ||
+ | |||
+ | On peut télécharger notre logo en format //png// dans le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | 28 -rw-r----- 1 apache apache 26620 8 mai 2017 / | ||
+ | 16 -rw-rw---- 1 apache apache 12656 10 juil. 2018 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== config.inc.local.php ==== | ||
+ | |||
+ | On copie tout le contenu de l' | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | < | ||
+ | <?php | ||
+ | |||
+ | ##### FICHIER DE CONFIGURATION: | ||
+ | |||
+ | ## 2019-11-17, Michel-André. | ||
+ | ## 2019-11-18_12h49 - $ldap_url, $ldap_binddn et $ldap_bindpw | ||
+ | ## proviennent du fichier / | ||
+ | |||
+ | |||
+ | ##### CONFIGURATION GÉNÉRALE | ||
+ | $lang = " | ||
+ | $show_menu = true; | ||
+ | |||
+ | ## Notification d'un changement de mot de passe | ||
+ | # Utilisez cette option pour envoyer un courrier de confirmation à | ||
+ | # l' | ||
+ | # défaut -> false | ||
+ | $notify_on_change = true; | ||
+ | |||
+ | ## Action par défaut | ||
+ | # Par défaut, la page de modification du mot de passe est affichée. Vous pouvez | ||
+ | # configurer quelle page doit être affichée lorsqu' | ||
+ | # Valeurs possibles: | ||
+ | # change <- défaut | ||
+ | # sendtoken <- tout faire par jeton courriel | ||
+ | # sendsms >- utiliser le courrier SMS | ||
+ | $default_action = " | ||
+ | |||
+ | ## Utilisation de sms | ||
+ | # Pour activer cette fonctionnalité, | ||
+ | # mobile dans ses préférences. Disponible avec le module NethServer " | ||
+ | # défaut -> false | ||
+ | $use_sms = false; | ||
+ | |||
+ | ##### QUESTION | ||
+ | # Vous pouvez activer ou désactiver la fonctionnalité de changement de mot de passe par | ||
+ | # question. | ||
+ | # défaut -> false | ||
+ | $use_questions = true; | ||
+ | |||
+ | # Les mots-clé doivent être en minuscule et sans accents. | ||
+ | $messages[' | ||
+ | $messages[' | ||
+ | $messages[' | ||
+ | $messages[' | ||
+ | $messages[' | ||
+ | |||
+ | # Vous devez configurer $keyphrase (Phrase de passe) pour que le chiffrement de la réponse | ||
+ | # fonctionne. À votre choix, mais ne doit pas être modifiée par la suite. | ||
+ | $keyphrase = " | ||
+ | # Chiffrage de la réponse à la question dans l' | ||
+ | # défaut -> true | ||
+ | # Pour la ompatibilité avec Active Directory -> false | ||
+ | $crypt_answers = false; | ||
+ | |||
+ | |||
+ | ##### STRATÉGIE DE MOT DE PASSE LOCAL DÉBUT | ||
+ | # Celle-ci est appliquée avant la politique de mot de passe de l' | ||
+ | # Longueur minimale. | ||
+ | $pwd_min_length = 7; | ||
+ | # Longueur maximale. | ||
+ | # Définir à 0 pour désactiver le contrôle de la longueur maximale. | ||
+ | $pwd_max_length = 16; | ||
+ | # Nombre minimum de caractères en minuscule. | ||
+ | $pwd_min_lower = 3; | ||
+ | # Nombre maximal de caractères en majuscule. | ||
+ | $pwd_min_upper = 1; | ||
+ | # Nombre minimum de caractères numériques. | ||
+ | $pwd_min_digit = 1; | ||
+ | # Nombre minimum de caractères non-alphanumériques. | ||
+ | $pwd_min_special = 1; | ||
+ | # L' | ||
+ | # caractères sauf les caractères alphabétiques et numériques. | ||
+ | $pwd_special_chars = " | ||
+ | # Caractères défendus. | ||
+ | # Vous pouvez empêcher certains caractères d' | ||
+ | $pwd_forbidden_chars = " | ||
+ | # Ne pas réutiliser le même mot de passe qu' | ||
+ | # true <- Défaut ** On ne peut pas utiliser le même mot de passe. | ||
+ | # false ** On peut utiliser le même mot de passe. | ||
+ | $pwd_no_reuse = true; | ||
+ | # Vérifier que le mot de passe est différent de celui du login. | ||
+ | $pwd_diff_login = true; | ||
+ | # Vous pouvez définir le nombre de classes de caractères différentes | ||
+ | # (minuscule, majuscule, chiffre, non-alphanumérique) dans le mot de passe. | ||
+ | $pwd_complexity = 2; | ||
+ | # Permet de vérifier si le mot de passe a déjà été compromis, en utilisant la | ||
+ | # base de données https:// | ||
+ | # Défaut -> false. | ||
+ | $use_pwnedpasswords = false; | ||
+ | # Afficher le message des contraintes de la stratégie de mot de passe: | ||
+ | # always <- défaut. | ||
+ | # never | ||
+ | # onerror | ||
+ | $pwd_show_policy = " | ||
+ | # Endroit pour affichager le message de la stratégie de mot de passe: | ||
+ | # above - (en haut) <- défaut | ||
+ | # below - (en bas) | ||
+ | $pwd_show_policy_pos = " | ||
+ | ##### STRATÉGIE DE MOT DE PASSE LOCAL FIN | ||
+ | |||
+ | |||
+ | ##### LOGO | ||
+ | $logo = " | ||
+ | |||
+ | |||
+ | ##### JOURNAL | ||
+ | # Par défaut, les URL générées sont consignées dans le journal des erreurs Apache. | ||
+ | # Ce comportement peut être modifié pour les insérer dans un fichier spécifique. | ||
+ | # L' | ||
+ | $reset_request_log = "/ | ||
+ | |||
+ | |||
+ | ##### LDAP EN TANT QUE FOURNISSEUR DES COMPTES - DÉBUT | ||
+ | # Adresse du serveur | ||
+ | # Ce paramètre se trouve dans le fichier: | ||
+ | # Pour utiliser SSL, définiR ldaps dans l'URL. | ||
+ | $ldap_url = " | ||
+ | |||
+ | ## Justificatif - nom et mot de passe | ||
+ | # Ces paramètres se trouvent dans le fichier: | ||
+ | $ldap_binddn = " | ||
+ | $ldap_bindpw = " | ||
+ | |||
+ | # Celui qui change les mots de passe. | ||
+ | $who_change_password = " | ||
+ | |||
+ | # Recherche | ||
+ | # Pour définir la base de la recherche et le filtre de recherche. | ||
+ | # Ces paramètres se trouvent dans le fichier: | ||
+ | $ldap_base = " | ||
+ | # Filtre pour la recherche | ||
+ | $ldap_filter = " | ||
+ | |||
+ | # Définit l' | ||
+ | $mail_attribute = " | ||
+ | |||
+ | # Attribut de la réponse | ||
+ | # Définit l' | ||
+ | # de l' | ||
+ | $answer_objectClass = " | ||
+ | $answer_attribute = " | ||
+ | ##### LDAP EN TANT QUE FOURNISSEUR DES COMPTES - FIN | ||
+ | |||
+ | |||
+ | ##### COURRIELS - DÉBUT | ||
+ | # 1) Tout d' | ||
+ | # adresse courriel. Un courriel lui est alors envoyé. | ||
+ | # 2) Ensuite, l' | ||
+ | # définir un nouveau mot de passe. | ||
+ | # Les sessions PHP sont utilisées pour stocker et récupérer les jetons côté serveur. | ||
+ | # On peut activer/ | ||
+ | # Défaut " | ||
+ | $use_tokens = true; | ||
+ | |||
+ | # Adresse courriel | ||
+ | # Vous pouvez également éviter de demander l' | ||
+ | # identifinat lui sera demandé. L' | ||
+ | # Le défaut " | ||
+ | # courriel. La valeur " | ||
+ | $mail_address_use_ldap = true; | ||
+ | |||
+ | # Chiffrement des jetons | ||
+ | # Vous pouvez chiffrer les jetons pour protéger l' | ||
+ | # true <- défaut | ||
+ | $crypt_tokens = true; | ||
+ | |||
+ | # Durée de vie des jetons (en secondes) | ||
+ | # Vous devez définir une durée de vie pour les jetons, afin qu'ils soient supprimés s'ils ne | ||
+ | # sont pas utilisés. | ||
+ | # Défaut " | ||
+ | $token_lifetime = " | ||
+ | |||
+ | # De qui le courriel doit-il provenir? | ||
+ | $mail_from = " | ||
+ | $mail_from_name = " | ||
+ | $mail_signature = ""; | ||
+ | |||
+ | # Configuration de PHPMailer (voir https:// | ||
+ | $mail_sendmailpath = '/ | ||
+ | $mail_protocol = ' | ||
+ | $mail_smtp_debug = 0; | ||
+ | $mail_debug_format = ' | ||
+ | $mail_contenttype = ' | ||
+ | $mail_wordwrap = 0; | ||
+ | $mail_charset = ' | ||
+ | $mail_priority = 3; | ||
+ | $mail_newline = PHP_EOL; | ||
+ | ##### COURRIELS - FIN | ||
+ | |||
+ | ##### FIN DU FICHIER DE CONFIGUTATION SSP: config.inc.local.php | ||
+ | |||
+ | </ | ||
+ | |||
+ | <wrap em>#</ | ||
+ | |||
+ | <wrap em>/< | ||
+ | |||
+ | <wrap em>< | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | <wrap em>/< | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | /* | ||
+ | ##### STRATÉGIE DE MOT DE PASSE LOCAL DÉBUT | ||
+ | ... | ||
+ | ##### STRATÉGIE DE MOT DE PASSE LOCAL FIN | ||
+ | */ | ||
+ | ... | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | ===== Vérification du lien ssp ===== | ||
+ | |||
+ | On se rend à l' | ||
+ | https:// | ||
+ | |||
+ | Tout s' | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-201-08-027.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Journal (log) ===== | ||
+ | |||
+ | On crée le fichier pour le journal de //SSP//. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# touch / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste le // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chown apache:root / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On ajuste les droits | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chmod 600 / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 0 -rw------- 1 apache root 0 16 nov. 16:58 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== reCAPTCHA ====== | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | **reCAPTCHA** est un système mettant à profit les capacités de reconnaissance des utilisateurs humains mobilisées par les tests // | ||
+ | |||
+ | Mis au point par des chercheurs de la Carnegie Mellon School of Computer Science de l' | ||
+ | |||
+ | En 2009, le projet // | ||
+ | |||
+ | Le 16 septembre 2009, //Google// annonce l' | ||
+ | |||
+ | En décembre 2014, une nouvelle version de // | ||
+ | |||
+ | ==== Connexion à Google ==== | ||
+ | |||
+ | On se rend à l'// | ||
+ | |||
+ | On crée un compte pour soi-même ou pour son entreprise et on se connecte avec son justificatif //Google//. | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-08-028.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-08-029.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-08-030.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | |{{ Images_Cahier-201-08-032.png? | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | Lorsque le compte //Google// est créé et que nous sommes connecté, on clique l' | ||
+ | |||
+ | On entre: https:// | ||
+ | |{{ Images_Cahier-201-08-031.png? | ||
+ | </ | ||
+ | |||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | ==== Configuration de la demande reCAPTCHA ==== | ||
+ | |||
+ | === Libellé === | ||
+ | |||
+ | Entrez le libellé que vous souhaitez afin de vous en souvenir, c'est simplement un indicateur. | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-08-033.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | === Domaines === | ||
+ | |||
+ | Entrez votre nom de domaine sous la forme www.votredomaine.com //(sans http/ | ||
+ | |||
+ | === Accepter les conditions d' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | === Envoyer des alertes aux propriétaires === | ||
+ | |||
+ | Recevez des alertes si Google détecte un problème sur votre site; par exemple, une erreur de configuration ou une augmentation du trafic suspect. | ||
+ | |||
+ | <wrap em> | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-08-034.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | ==== Clés reCAPTCHA ==== | ||
+ | |||
+ | La dernière étape consiste à copier les clés du site et les coller dans les champs dédiés dans le fichier '' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On se déconnecte de notre compte Google. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-201-08-035.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Ajout au fichier config.inc.local.php ===== | ||
+ | |||
+ | On ajoute les lignes ci-dessous, entre "''##### | ||
+ | |||
+ | Remplacez certaines valeurs par vos paramètres personnel. | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | ##### COURRIELS - FIN | ||
+ | |||
+ | |||
+ | ##### reCAPTCHA v2 de Google - DÉBUT | ||
+ | ## CAPTCHA | ||
+ | # 2019-11-18_16h00 / VotreNomDeCourriel@gmail.com // Indice sur votre mot de pass GooGle | ||
+ | # défaut=false pour ne pas utiliser reCAPTCHA | ||
+ | $use_recaptcha = true; | ||
+ | |||
+ | # Clé publique | ||
+ | $recaptcha_publickey = "VOTRE CLÉ PUBLIQUE reCPATCHA"; | ||
+ | |||
+ | # Clé privée (secrète) | ||
+ | $recaptcha_privatekey = "VOTRE CLÉ PRIVÉE reCPATCHA"; | ||
+ | |||
+ | # Personnalisation (voir https:// | ||
+ | $recaptcha_theme = " | ||
+ | $recaptcha_type = " | ||
+ | $recaptcha_size = " | ||
+ | |||
+ | # Méthode de requête reCAPTCHA | ||
+ | # ' | ||
+ | # ' | ||
+ | $recaptcha_request_method = ' | ||
+ | ##### reCAPTCHA v2 de Google - FIN | ||
+ | |||
+ | |||
+ | ##### FIN DU FICHIER DE CONFIGUTATION SSP: config.inc.local.php | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | ===== Vérification de reCaptcha ===== | ||
+ | |||
+ | Afin de voir s' | ||
+ | https:// | ||
+ | |||
+ | </ | ||
+ | <WRAP column 65%> | ||
+ | |{{ Images_Cahier-201-08-036.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | On clique **Je ne suis pas un robot**. | ||
+ | |{{ Images_Cahier-201-08-037.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-08-038.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | Notre sélection d' | ||
+ | |{{ Images_Cahier-201-08-039.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Sauvegarde du répertoire de SSP ===== | ||
+ | |||
+ | On vérifie si le nom du répertoire ''/ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | NouvelleInclusion="/ | ||
+ | if grep -Fxq " | ||
+ | then | ||
+ | # L' | ||
+ | echo -e "\nLe fichier custom.include contient déjà l' | ||
+ | else | ||
+ | # L' | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | fi | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Ci-dessus, il n'y a pas de ligne vide avant ''/ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Exemples d' | ||
+ | |||
+ | ===== Préparation ===== | ||
+ | |||
+ | ==== reCaptcha ==== | ||
+ | |||
+ | Vu que nous avons déjà vérifié le fonctionnement de // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# sed -i ' | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | $use_recaptcha = false; | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Stratégie de mot de passe ==== | ||
+ | |||
+ | On vérifie l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | $pwd_show_policy = " | ||
+ | $pwd_show_policy_pos = " | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Nous changeons la stratégie pour l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# sed -i ' | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | $pwd_show_policy = " | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Changement standard du mot de passe ===== | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | L' | ||
+ | |{{ Images_Cahier-201-08-040.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | L' | ||
+ | |{{ Images_Cahier-201-08-041.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | L' | ||
+ | |{{ Images_Cahier-201-08-042.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | Il a reçu un courriel indiquant que son mot de passe a été changé. | ||
+ | |{{ Images_Cahier-201-08-043.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Enregistrement d'une réponse à une question ===== | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Question | ||
+ | |{{ Images_Cahier-201-08-044.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | L' | ||
+ | |{{ Images_Cahier-201-08-045.png? | ||
+ | |||
+ | |{{ Images_Cahier-201-08-046.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Changement par question ===== | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | L' | ||
+ | |{{ Images_Cahier-201-08-047.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | L' | ||
+ | |{{ Images_Cahier-201-08-048.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Changement par jeton ===== | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Mail** **->** l' | ||
+ | |{{ Images_Cahier-201-08-049.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | Un courriel a été envoyé. | ||
+ | |{{ Images_Cahier-201-08-050.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | Si ce n'est déjà fait, l' | ||
+ | |{{ Images_Cahier-201-08-051.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | L' | ||
+ | |{{ Images_Cahier-201-08-052.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | L' | ||
+ | |{{ Images_Cahier-201-08-053.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | L' | ||
+ | |{{ Images_Cahier-201-08-054.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Erreur dûe à la stratégie de mot de passe ===== | ||
+ | |||
+ | Au paragraphe | ||
+ | [[nethserver_201_cahier_08_self_service_password# | ||
+ | , nous avons choisi d' | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | L' | ||
+ | |{{ Images_Cahier-201-08-055.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-201-08-056.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== reCaptcha ===== | ||
+ | |||
+ | On réactive // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# sed -i ' | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | $use_recaptcha = true; | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Stratégie de mot de passe ===== | ||
+ | |||
+ | On remet l' | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | [root@tchana ~]# sed -i ' | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | $pwd_show_policy = " | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Appendices ====== | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | [[nethserver_201_cahier_04_dokuwiki# | ||
+ | du **Cahier-04: | ||
+ | |||
+ | ===== Écran conventionnel de démarrage ===== | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | Si nous voulons voir l' | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | ''/ | ||
+ | </ | ||
+ | |{{ Images_Cahier-101-03-368.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-101-03-367.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Suppression du paramètre rhgb ==== | ||
+ | |||
+ | Ligne originale dans le fichier ''/ | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | GRUB_CMDLINE_LINUX=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Après avoir enlevé le paramètre **rhgb**. | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | GRUB_CMDLINE_LINUX=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | On signale le changement en régénérant le fichier de configuration. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# grub2-mkconfig -o / | ||
+ | |||
+ | Generating grub configuration file ... | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | Found linux image: / | ||
+ | Found initrd image: / | ||
+ | done | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | ===== Nom du serveur dans l' | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | À l' | ||
+ | |||
+ | On peut supprimer complètement l' | ||
+ | |||
+ | Pour supprimer l' | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | ''/ | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-101-03-340.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | et y ajouter la ligne suivante: | ||
+ | |||
+ | Par contre, si nous modifions directement ce fichier, le prochain ré-amorçage écrasera la modification lorsque le serveur assemblera les gabarits de configuration du système. | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | Création du répertoire pour le gabarit personnalisé. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# mkdir -p / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On crée le fichier '' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | |||
+ | $config[' | ||
+ | |||
+ | EOT | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | $config[' | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On signale le changement. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# expand-template / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On redémarre le démon '' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# systemctl restart httpd | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP column 50%> | ||
+ | On se rend à l'// | ||
+ | Le domaine du serveur ne s' | ||
+ | </ | ||
+ | <WRAP column 40%> | ||
+ | |{{ Images_Cahier-101-03-341.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Sauvegarde ==== | ||
+ | |||
+ | On vérifie si le nom du répertoire ''/ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | NouvelleInclusion="/ | ||
+ | if grep -Fxq " | ||
+ | then | ||
+ | # L' | ||
+ | echo -e "\nLe fichier custom.include contient déjà l' | ||
+ | else | ||
+ | # L' | ||
+ | echo -e " | ||
+ | echo -e " | ||
+ | fi | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Ci-dessus, il n'y a pas de ligne vide avant __/ | ||
+ | |||
+ | ===== Langue à la console du serveur ===== | ||
+ | |||
+ | On affiche les langues offertes à la console du serveur. | ||
+ | |||
+ | [root@tchana ~]# localectl list-locales | grep fr_ | ||
+ | | ||
+ | fr_BE | ||
+ | fr_BE.iso88591 | ||
+ | fr_BE.iso885915@euro | ||
+ | fr_BE.utf8 | ||
+ | fr_BE@euro | ||
+ | fr_CA | ||
+ | fr_CA.iso88591 | ||
+ | fr_CA.utf8 | ||
+ | fr_CH | ||
+ | fr_CH.iso88591 | ||
+ | fr_CH.utf8 | ||
+ | fr_FR | ||
+ | fr_FR.iso88591 | ||
+ | fr_FR.iso885915@euro | ||
+ | fr_FR.utf8 | ||
+ | fr_FR@euro | ||
+ | fr_LU | ||
+ | fr_LU.iso88591 | ||
+ | fr_LU.iso885915@euro | ||
+ | fr_LU.utf8 | ||
+ | fr_LU@euro | ||
+ | [root@tchana ~]# | ||
+ | |||
+ | On ajuste la langue désirée pour l' | ||
+ | |||
+ | [root@tchana ~]# localectl set-locale LANG=fr_FR.utf8 | ||
+ | | ||
+ | [root@tchana ~]# | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | On pourra vérifier, après le prochain redémarrage, | ||
+ | |||
+ | [root@tchana ~]# ls -als toto | ||
+ | | ||
+ | ls: impossible d' | ||
+ | [root@tchana ~]# | ||
+ | |||
+ | ===== Langue de l' | ||
+ | |||
+ | On change la langue de l' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | **Administration | ||
+ | |{{ Images_Cahier-101-03-112.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **ADD**. | ||
+ | |{{ Images_Cahier-101-03-113.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **APPLY CHANGES**. | ||
+ | |{{ Images_Cahier-101-03-114.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 22%> | ||
+ | \\ | ||
+ | Le //RPM// // | ||
+ | |{{ Images_Cahier-101-03-115.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Reload page**. | ||
+ | |{{ Images_Cahier-101-03-116.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | On se __déconnecte/ | ||
+ | |{{ Images_Cahier-101-03-117.png? | ||
+ | </ | ||
+ | <WRAP column 22%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-118.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Table de mappe de clavier ===== | ||
+ | |||
+ | On affiche les différentes mappes de clavier(( **Table de mappe de clavier**: n.f. Disposition des touches d'un clavier.\\ | ||
+ | // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# localectl list-keymaps | grep ca | ||
+ | |||
+ | ca | ||
+ | ca-eng | ||
+ | ca-fr-dvorak | ||
+ | ca-fr-legacy | ||
+ | ca-multi | ||
+ | ca-multix | ||
+ | dvorak-ca-fr | ||
+ | es-cat | ||
+ | ph-capewell-dvorak | ||
+ | ph-capewell-qwerf2k6 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On active le clavier // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# localectl set-keymap ca-multi | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# localectl | ||
+ | |||
+ | | ||
+ | VC Keymap: ca-multi | ||
+ | X11 Layout: us | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ===== Fermeture automatique de session (session timeout) ===== | ||
+ | |||
+ | // | ||
+ | Par défaut //(à partir de NethServer 7.5.1804)//, | ||
+ | |||
+ | La commande ci-dessous définit **2** heures de //délai d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# config setprop httpd-admin MaxSessionIdleTime 7200 MaxSessionLifeTime 57600 | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Désactivation des délais. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# config setprop httpd-admin MaxSessionIdleTime '' | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | ===== Fuseau horaire ===== | ||
+ | |||
+ | Pour le fuseau horaire, il existe un fichier pour // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | 4 -rw-r--r-- | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Changement du fuseau horaire ==== | ||
+ | |||
+ | On affiche le fuseau horaire actuel. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -l / | ||
+ | |||
+ | lrwxrwxrwx 1 root root 37 19 mai 23:48 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On change le fuseau horaire pour celui de // | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# timedatectl set-timezone America/ | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -l / | ||
+ | |||
+ | lrwxrwxrwx 1 root root 38 22 mai 14:02 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Voilà! Le fuseau horaire // | ||
+ | |||
+ | ===== Certificat Let's Encrypt ===== | ||
+ | |||
+ | ==== Description ==== | ||
+ | |||
+ | Un certificat émis par l' | ||
+ | |||
+ | // | ||
+ | // | ||
+ | |||
+ | === Examen du certificat === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | Si la demande de certificat a fonctionnée sans erreur, essayez de vous connecter à la page de l' | ||
+ | |||
+ | On se connecte à l' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-369.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-370.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Plus d' | ||
+ | |{{ Images_Cahier-101-03-371.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-372.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-373.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-374.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-375.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Vérification par Qualsys SSLLabs ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | Une fois que vous avez obtenu votre certificat, testez-le en vous rendant chez //Qualsys SSLLabs//, [[https:// | ||
+ | Soumettez le nom //FQDN// de votre domaine pour vérifier que le certificat fonctionne correctement. | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 46%> | ||
+ | // | ||
+ | **micronator-101.org | ||
+ | |{{ Images_Cahier-101-03-376.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-377.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Changement du mot de passe de root ===== | ||
+ | |||
+ | // | ||
+ | Réinitialiser le mot de passe de **__root__** est normalement une tâche simple si vous êtes déjà connecté avec les privilèges de **__root__**. Toutefois, si vous oubliez le mot de passe et devez le changer, les choses deviennent un peu plus difficiles.\\ | ||
+ | Le processus a changé de la version 6 de // | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | Si votre système Linux est en cours d' | ||
+ | |||
+ | Pour //CentOS 7//, le menu de démarrage vous laissera 5 secondes pour sélectionner le noyau du système d’exploitation à démarrer. Ces 5 secondes sont importantes, | ||
+ | |||
+ | Dans le menu de démarrage, appuyez sur <wrap em> | ||
+ | |||
+ | {{ Images_Cahier-101-03-378.png? | ||
+ | \\ | ||
+ | |||
+ | Dans les options de '' | ||
+ | |||
+ | < | ||
+ | rd.break | ||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-101-03-379.png? | ||
+ | \\ | ||
+ | |||
+ | Appuyez sur **[Ctrl]** + **[x]** pour démarrer avec ces options qui vous amèneront à l' | ||
+ | |||
+ | {{ Images_Cahier-101-03-380.png? | ||
+ | \\ | ||
+ | |||
+ | À ce stade, le système de fichiers racine est monté en mode lecture seule //(ro)// dans le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | switch_root:/# | ||
+ | |||
+ | switch_root:/# | ||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-101-03-381.png? | ||
+ | \\ | ||
+ | |||
+ | Une fois le système de fichiers remonté, changez-le en une //prison chroot// afin que le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | switch_root:/# | ||
+ | |||
+ | sh-4.2# | ||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-101-03-382.png? | ||
+ | \\ | ||
+ | |||
+ | À partir d'ici, le mot de passe de **__root__** peut être réinitialisé à l’aide de la commande '' | ||
+ | |||
+ | < | ||
+ | sh-4.2# passwd | ||
+ | |||
+ | Changing password for user root. | ||
+ | New password: Nouveau-mot-de-passe-de-root | ||
+ | Retype new passwd: Nouveau-mot-de-passe-de-root | ||
+ | passwd: all authentification tokens updated successfully. | ||
+ | sh-4.2# | ||
+ | </ | ||
+ | |||
+ | {{ Images_Cahier-101-03-383.png? | ||
+ | \\ | ||
+ | |||
+ | Si vous n' | ||
+ | |||
+ | On crée le fichier ''/ | ||
+ | |||
+ | < | ||
+ | sh-4.2# touch / | ||
+ | |||
+ | sh-4.2# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On quitte l' | ||
+ | |||
+ | < | ||
+ | sh-4.2# exit | ||
+ | |||
+ | exit | ||
+ | sh-4.2# | ||
+ | </ | ||
+ | |||
+ | On quitte le shell racine '' | ||
+ | |||
+ | < | ||
+ | sh-4.2# exit | ||
+ | |||
+ | logout | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | ==== Vérification ==== | ||
+ | |||
+ | __À la console du serveur__, vous devriez pouvoir vous connecter et utiliser le système avec le nouveau mot de passe que vous avez créé. | ||
+ | |||
+ | ===== ERROR Failed to send host log message ===== | ||
+ | |||
+ | Cette erreur s' | ||
+ | |||
+ | {{ Images_Cahier-101-03-384.png? | ||
+ | \\ | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-101-03-385.png? | ||
+ | \\ | ||
+ | Au retour, on amorce le //Serveur NethServer// | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | **Affichage ->** onglet **Écran -> Contrôleur graphique ->** on change pour **VboxVGA -> OK**. | ||
+ | |{{ Images_Cahier-101-03-386.png? | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Martian source ===== | ||
+ | |||
+ | Si dans le fichier journal ''/ | ||
+ | |||
+ | < | ||
+ | ...IPv4: martian source 192.168.1.1... | ||
+ | ...IPv4: martian source 192.168.1.1... | ||
+ | ...IPv4: martian source 192.168.1.1... | ||
+ | </ | ||
+ | |||
+ | === Passerelle du réseau de la carte enp0s3 === | ||
+ | |||
+ | On trouve notre passerelle en lançant un '' | ||
+ | |||
+ | < | ||
+ | [root@dorgee ~]# traceroute google.com | ||
+ | |||
+ | traceroute to google.com (172.217.165.14), | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | [root@dorgee ~]# | ||
+ | </ | ||
+ | L' | ||
+ | \\ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Configuration | ||
+ | |||
+ | On change l'// | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-101-03-395.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Serveurs DNS ==== | ||
+ | |||
+ | // | ||
+ | ... Le //DNS// de // | ||
+ | Le principal avantage bien sûr, c'est que contrairement au //DNS// de Google qui permet de mieux vous profiler pour vous balancer de la pub, on sait que // | ||
+ | |||
+ | // | ||
+ | |||
+ | //Autre référence:// | ||
+ | |||
+ | // | ||
+ | |||
+ | <WRAP center> | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-101-03-396.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-101-03-397.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Configuration | ||
+ | |||
+ | On ajuste les //**DNS Primaire**// | ||
+ | |||
+ | {{Images_Cahier-101-03-005.png? | ||
+ | |||
+ | Le serveur //**DNS secondaire**// | ||
+ | |||
+ | **Soumettre**. | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-101-03-398.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Si votre //FAI// filtre l' | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Introduction à l' | ||
+ | |||
+ | // | ||
+ | |||
+ | **'' | ||
+ | |||
+ | La documentation de '' | ||
+ | |||
+ | Tout d' | ||
+ | |||
+ | - **'' | ||
+ | - **'' | ||
+ | - **'' | ||
+ | |||
+ | Dès son invocation, '' | ||
+ | |||
+ | Afin de basculer du mode // | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | Nous allons commencer par invoquer '' | ||
+ | < | ||
+ | vi | ||
+ | </ | ||
+ | |||
+ | Ce qui devrait donner l' | ||
+ | |||
+ | '' | ||
+ | |||
+ | < | ||
+ | i | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-01-018.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 45%> | ||
+ | Après avoir tapé le texte suivant: | ||
+ | |||
+ | < | ||
+ | vi est un éditeur de texte très | ||
+ | |||
+ | utile pour la communauté des | ||
+ | administrateurs. | ||
+ | </ | ||
+ | |||
+ | On obtient l' | ||
+ | </ | ||
+ | <WRAP column 45%> | ||
+ | |{{ Images_Cahier-101-01-019.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Après cela, on pourrait passer en mode // | ||
+ | |||
+ | Une fois en mode // | ||
+ | |||
+ | Ceci aura pour effet de supprimer la ligne. | ||
+ | |||
+ | Si on est satisfait, il ne nous reste plus qu'à sauvegarder le document sous le nom '' | ||
+ | |||
+ | < | ||
+ | :w texte1.txt | ||
+ | </ | ||
+ | |||
+ | //(Pour les sauvegardes ultérieures, | ||
+ | |||
+ | Afin de quitter '' | ||
+ | |||
+ | < | ||
+ | :q texte1.txt | ||
+ | </ | ||
+ | |||
+ | Les commandes abondent dans '' | ||
+ | |||
+ | ^ <WRAP centeralign> | ||
+ | |// | ||
+ | |i (insert)|Insère un texte sur le curseur| | ||
+ | |I|Insère au début de la ligne| | ||
+ | |a (append)|Insère après le curseur| | ||
+ | |A|Insère à la fin de la ligne| | ||
+ | |Les flèches|pour les déplacements| | ||
+ | |Ctrl-F (forward)|Défiler d'un écran vers le bas| | ||
+ | |Ctrl-B (backward)|Défiler d'un écran vers le haut| | ||
+ | |nG (goto)|va à la nième ligne dans le texte| | ||
+ | |G|Va à la fin du texte| | ||
+ | |x|Effacer le caractère courant| | ||
+ | |dd|Effacer la ligne courante| | ||
+ | |D|Effacer depuis la position du curseur jusqu' | ||
+ | |db (DeleteBegining)|Effacer depuis la position courante jusqu' | ||
+ | |/ | ||
+ | |:w fichier|copie le texte courant sur le disque sous le nom fichier | | ||
+ | |:wq (write & quit)|écrit le fichier sur le disque et quitte vi.| | ||
+ | |: | ||
+ | |:set nu|Affiche le numérotage des lignes.| | ||
+ | \\ | ||
+ | \\ | ||
+ | {{NS-101_002_Banniere_Victoire.png? | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Crédits ====== | ||
+ | |||
+ | © 2019 RF-232\\ | ||
+ | Auteur: Michel-André.\\ | ||
+ | Remerciement: | ||
+ | Intégré par: Michel-André Robillard CLP\\ | ||
+ | Contact: michelandre at micronator.org | ||
+ | |||
+ | Répertoire de ce document: < | ||
+ | |||
+ | Historique des modifications: | ||
+ | |||
+ | ^Version^Date^Commentaire^Auteur| | ||
+ | |0.0.1|2019-11-16|Début.|M.-A. Robillard| | ||
+ | |12345678901| | |12345678901| | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | ===== AVIS DE NON-RESPONSABILITÉ ===== | ||
+ | |||
+ | Ce document est uniquement destiné à informer. Les informations, | ||
+ | |||
+ | RF‑232 ne peut être tenu pour responsable de dommages de quelque nature que ce soit, y compris des dommages directs ou indirects, ainsi que des dommages consécutifs résultant de l' | ||
+ | |||
+ | Chaque internaute doit prendre toutes les mesures appropriées //(mettre à jour régulièrement son logiciel antivirus, ne pas ouvrir des documents suspects de source douteuse ou non connue)// de façon à protéger le contenu de son ordinateur de la contamination d' | ||
+ | |||
+ | Toute reproduction interdite | ||
+ | Vous reconnaissez et acceptez que tout le contenu de ce document, incluant mais sans s’y limiter, le texte et les images, sont protégés par le droit d’auteur, les marques de commerce, les marques de service, les brevets, les secrets industriels et les autres droits de propriété intellectuelle. Sauf autorisation expresse de RF-232, vous acceptez de ne pas vendre, délivrer une licence, louer, modifier, distribuer, copier, reproduire, transmettre, | ||
+ | |||
+ | ==== Avertissement==== | ||
+ | |||
+ | Bien que nous utilisions ici un vocabulaire issu des techniques informatiques, | ||
+ | \\ | ||
+ | \\ |