nethserver_301_cahier_02_active_directory
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | |||
nethserver_301_cahier_02_active_directory [2019-12-26 23:07] – FINAL 2019-12-26_18h07 michelandre | nethserver_301_cahier_02_active_directory [2025-01-12 19:30] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | \\ | ||
+ | {{ Images_Cahier-301-02-001.png? | ||
+ | \\ | ||
+ | ====== Description générale ====== | ||
+ | Le **Cahier-02: | ||
+ | |||
+ | ===== But de ce cahier ===== | ||
+ | |||
+ | - Installer //Samba 4 Active Directory// sur un //Serveur NethServer// | ||
+ | - Utiliser la méthode de changement de mot de passe par // | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | [[nethserver_301_cahier_01_rsat|Cahier-301-01]] | ||
+ | ** //RSAT (Remote Server Administration Tools)// du "Cours NethServer-301" | ||
+ | |||
+ | Les procédures sont exactement les mêmes pour un //Serveur NethServer// | ||
+ | |||
+ | {{ Images_Cahier-301-02-002.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-301-02-003.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Serveur NethServer-7.6.1810 ===== | ||
+ | |||
+ | Le //Serveur NethServer-7.6.1810// | ||
+ | |||
+ | ==== dorgee.micronator.org ==== | ||
+ | |||
+ | - Serveur passerelle pour les connexions à l' | ||
+ | - Serveur //DHCP// pour tout le réseau LOCAL // | ||
+ | |||
+ | ==== tchana.micronator-dev.org ==== | ||
+ | |||
+ | Serveur virtuel LOCAL sous // | ||
+ | |||
+ | ===== Poste de travail ===== | ||
+ | |||
+ | Windows-8.1, | ||
+ | |||
+ | ===== É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:// | ||
+ | // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Mots de passe ===== | ||
+ | |||
+ | ==== LDAP ==== | ||
+ | |||
+ | Lorsque nous voulons utiliser //Active Directory// comme fournisseur des comptes sur un //Serveur NethServer//, | ||
+ | |||
+ | Lors d'une désinstallation du fournisseur //LDAP//, une liste d' | ||
+ | |||
+ | ==== Active Directory ==== | ||
+ | |||
+ | Lors d'une installation d'// | ||
+ | |||
+ | === Importation des comptes === | ||
+ | |||
+ | Une fois //Active Directory// installé, nous pouvons importer les comptes depuis les fichiers //TSV//, mais //AD// n' | ||
+ | |||
+ | Après l' | ||
+ | |||
+ | De plus, si nous leur envoyons un courriel avec leur nouveau mot de passe, les anciens utilisateurs ne pourront pas accéder à leur compte de messagerie, car ils ne connaissent pas leur nouveau mot de passe pour se connecter. | ||
+ | |||
+ | ==== Solution ==== | ||
+ | |||
+ | Dans le ** | ||
+ | [[nethserver_201_cahier_08_self_service_password|Cahier-201-08: | ||
+ | ** // | ||
+ | |||
+ | Lorsque nous récupérerons les anciens comptes, //Active Directory// récupérera la question et la réponse des utilisateurs __si cette réponse <wrap em> | ||
+ | |||
+ | Après l' | ||
+ | |||
+ | ==== Mise en garde ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | === Réponse === | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | Lors d'un changement de mot de passe par réponse à une question, la réponse donnée n'est pas analysée par //SSP//; il compare seulement la question et la réponse avec celles préalablement fournies avant la demande de changement de mot de passe. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Préparation de l' | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | [[nethserver_101_cahier_03_creation_un_serveur_virtuel|Cahier-03: | ||
+ | ** // | ||
+ | |||
+ | ===== Configuration du poste de travail ===== | ||
+ | |||
+ | ==== Vérification ==== | ||
+ | |||
+ | Voir le chapitre ** | ||
+ | [[nethserver_101_cahier_03_creation_un_serveur_virtuel# | ||
+ | ** du **Cahier-03: | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **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 46%> | ||
+ | |{{ Images_Cahier-301-02-004.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | '' | ||
+ | |||
+ | Les //CNAME// de notre //Serveur NethServer// | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-301-02-005.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' | ||
+ | [[nethserver_101_cahier_03_creation_un_serveur_virtuel|Cahier-03]]: | ||
+ | ** // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Vérification du certificat Let's Encrypt ===== | ||
+ | |||
+ | Pour l' | ||
+ | [[nethserver_101_cahier_04_local_certificat_let_encrypt|Cahier-04: | ||
+ | ** // | ||
+ | |||
+ | <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: // | ||
+ | [[nethserver_101_cahier_03_creation_un_serveur_virtuel|Cahier-03]]: | ||
+ | ** // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ 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-301-02-015.png? | ||
+ | **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" | ||
+ | |||
+ | Les utilisateurs **__toto__** et **__titi__** ont été créés dans le ** | ||
+ | [[nethserver_201_cahier_08_self_service_password|Cahier-201-08]] | ||
+ | :** // | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | {{ Images_Cahier-201-08-014.png? | ||
+ | ==== Groupes ==== | ||
+ | |||
+ | Le groupe **__grp-utilisateurs__** a été créé dans le ** | ||
+ | [[nethserver_201_cahier_08_self_service_password|Cahier-201-08]] | ||
+ | :** // | ||
+ | |||
+ | Il contient deux membres: **__toto__** et **__titi__**. | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Répertoires personnels ==== | ||
+ | |||
+ | On vérifie les 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 des courriels ==== | ||
+ | |||
+ | On vérifie les répertoires des 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 ===== | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Version //PHP// par défaut. | ||
+ | |||
+ | **Configuration -> Paramètres PHP ->** onglet **Version PHP Apache**. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-301-02-016.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Ajustements des paramètres de la version // | ||
+ | |||
+ | **Configuration -> Paramètres PHP ->** onglet **Php V7.2 SCL**. | ||
+ | |||
+ | {{Images_icone-201-006_Securite.png? | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-201-08-022.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Paramètres de la version par défaut de //PHP//. | ||
+ | |||
+ | **Configuration -> Paramètres PHP ->** onglet **Version par défaut de PHP**. | ||
+ | |||
+ | {{Images_icone-201-006_Securite.png? | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-201-08-023.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | === Vérifications à la ligne de commande === | ||
+ | |||
+ | 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 ~]# | ||
+ | </ | ||
+ | |||
+ | 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 ~]# | ||
+ | </ | ||
+ | |||
+ | ===== À surveiller ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-301-02-017.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-301-02-018.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Exportation des Question/ | ||
+ | |||
+ | ===== Prérequis ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Sécurité ===== | ||
+ | |||
+ | - Parce que //LDAP// et //Active Directory// n' | ||
+ | - {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | < | ||
+ | [toto@micronator-dev.org@tchana ~]$ ldapsearch -Y EXTERNAL | grep -e "#" | ||
+ | |||
+ | ... | ||
+ | # titi, People, directory.nh | ||
+ | info: {voiture} Honda | ||
+ | ... | ||
+ | [toto@micronator-dev.org@tchana ~]$ | ||
+ | </ | ||
+ | |||
+ | - Parce que nous n' | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chmod 700 / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | 84 -rwx------ 1 root root 85928 29 janv. 2019 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Vérification du nombre de Q/R ===== | ||
+ | |||
+ | On cherche le nombre d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ldapsearch -Y EXTERNAL | ||
+ | |||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | 4 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Nous avons 4 utilisateurs. | ||
+ | |||
+ | On peut afficher leur identifiant. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ldapsearch -Y EXTERNAL | ||
+ | |||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | uid: admin | ||
+ | uid: michelandre | ||
+ | uid: toto | ||
+ | uid: titi | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie le nombre de réponses. Elles sont stockées dans l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ldapsearch -Y EXTERNAL | grep " | ||
+ | |||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | 2 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Nous avons 2 utilisateurs qui ont une réponse à une question. | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On vérifie quels sont nos usagers qui ont choisi, ou non, une Question/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ldapsearch -Y EXTERNAL | grep -e "# " -e info: | ||
+ | |||
+ | ... | ||
+ | # admin, People, directory.nh | ||
+ | # domain admins, Groups, directory.nh | ||
+ | # michelandre, | ||
+ | info: {voiture}MG | ||
+ | # toto, People, directory.nh | ||
+ | info: {voiture}Honda | ||
+ | # titi, People, directory.nh | ||
+ | # grp-utilisateurs, | ||
+ | # search result | ||
+ | # numResponses: | ||
+ | # numEntries: 12 | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Script d' | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | #!/bin/bash | ||
+ | |||
+ | # Script qui estraie tous les utilisateurs de LDAP et qui on une réponse à une question | ||
+ | # qu'ils peuvent utiliser pour changer leur mot de passe sans devoir à fournir leur mot de | ||
+ | # passe original et en utilisant SSP - Self Service Password. | ||
+ | # À la fin du script, le fichier exportation.ldif contient tous les enregistrements pour une | ||
+ | # importation de la réponse de chaque utilisateur dans Active Directory. | ||
+ | # Michel-André: | ||
+ | # 2019-11-11_11h54 Ajout des (\") parce que micronator-dev contien un (-). | ||
+ | # 2019-12-20_16h11 Il faut que tous les utilisateurs se soient logués, au moins une fois, | ||
+ | # avec Webmail afin de créer leur répertoire de messagerie électronique, | ||
+ | # ne seront pas exportés avec ce script. | ||
+ | |||
+ | ## Fonction pour l' | ||
+ | ad-toto () { | ||
+ | # Le premier paramètre est le nom de l' | ||
+ | # la fonction | ||
+ | USAGER_LDAP=$1 | ||
+ | | ||
+ | # Recherche et isolation de tous les paramètres de l' | ||
+ | ldapsearch -Y EXTERNAL | grep "uid: $USAGER_LDAP" | ||
+ | |||
+ | # Isolation de la ligne contenant le paramètre de la Question et remplacememsnt | ||
+ | # de " | ||
+ | COMMENTAIRE=`cat $USAGER_LDAP.txt | grep " | ||
+ | | ||
+ | # Isolation du nom de l' | ||
+ | NOM_USAGER=`cat $USAGER_LDAP.txt | grep "uid: " | sed -e ' | ||
+ | | ||
+ | # Assemblage du DN de l' | ||
+ | # Il faut mettre des guillemets (") avec un (\) devant comme " | ||
+ | # parce que micronator-dev contient un (-). | ||
+ | DN=" | ||
+ | |||
+ | # Création de chaque ligne pour le fichier LDIF d' | ||
+ | LIGNE1=" | ||
+ | LIGNE2=" | ||
+ | # À la ligne-3, on ajoute (add) le paramètre " | ||
+ | LIGNE3=" | ||
+ | LIGNE4=" | ||
+ | |||
+ | # Si l' | ||
+ | # Surtout utilisé pour rejeter " | ||
+ | # Si l' | ||
+ | if [ -z " | ||
+ | then | ||
+ | echo -e " | ||
+ | rm -rf $USAGER_LDAP.txt | ||
+ | return | ||
+ | fi | ||
+ | | ||
+ | # Écriture des lignes pour cet usager dans le fichier LDIP. | ||
+ | echo -e $LIGNE1 >> exportation.ldif 2>&1 | ||
+ | echo -e $LIGNE2 >> exportation.ldif 2>&1 | ||
+ | echo -e $LIGNE3 >> exportation.ldif 2>&1 | ||
+ | echo -e " | ||
+ | rm -rf $USAGER_LDAP.txt | ||
+ | } | ||
+ | ## Fin de la fonction " | ||
+ | |||
+ | ## Début du script | ||
+ | # On se rend dans le dossier des répertoires de messagerie | ||
+ | cd / | ||
+ | |||
+ | # On extraie le nom de tous les utilisateurs depuis LDAP | ||
+ | getent passwd * | cut -f6 -d: | cut -f6 -d/ > / | ||
+ | |||
+ | # On retourne dans le répertoire personnel de " | ||
+ | cd /root | ||
+ | |||
+ | # On supprime les lignes vide dans le fichier / | ||
+ | sed -i '/ | ||
+ | |||
+ | # On débute avec un nouveau fichier LDIF | ||
+ | rm -rf exportation.ldif | ||
+ | touch / | ||
+ | |||
+ | # Boucle pour l' | ||
+ | while read p; do | ||
+ | # Appel de la fonctio ad-toto | ||
+ | ad-toto " | ||
+ | done < / | ||
+ | |||
+ | # Nettoyage final | ||
+ | # Suppression des fichiers intermédiaires. | ||
+ | # Mettre en commentaire les lignes ci-dessous pour déverminer ce script. | ||
+ | rm -rf utilisateurs.txt | ||
+ | rm -rf $USAGER_LDAP.txt | ||
+ | rm -rf temp.txt | ||
+ | |||
+ | # On indique que le script est terminé. | ||
+ | echo -e " | ||
+ | |||
+ | # FIN DU SCRIPT exportation-qestion-reponse.sh | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Lancement du script ==== | ||
+ | |||
+ | On téléverse le fichier '' | ||
+ | |||
+ | On ajuste les droits du fichier. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chmod 700 exportation-qestion-reponse.sh | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als exportation-qestion-reponse.sh | ||
+ | |||
+ | 4 -rwx------ 1 root root 3391 1 déc. 09:46 exportation-qestion-reponse.sh | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On lance le script. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | |||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | Le script est terminé. | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | |||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | L' | ||
+ | |||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | SASL/ | ||
+ | SASL username: gidNumber=0+uidNumber=0, | ||
+ | SASL SSF: 0 | ||
+ | Le script est terminé. | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | ==== Fichier d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | dn: cn=michelandre, | ||
+ | changetype: modify | ||
+ | add: comment | ||
+ | comment: {voiture}MG | ||
+ | |||
+ | dn: cn=titi, | ||
+ | changetype: modify | ||
+ | add: comment | ||
+ | comment: {saison}Un printemps doux | ||
+ | |||
+ | dn: cn=toto, | ||
+ | changetype: modify | ||
+ | add: comment | ||
+ | comment: {voiture}Honda | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Le concept de Domaine ====== | ||
+ | |||
+ | ===== Le concept de Domaine chez Microsoft ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | Chez Microsoft, un domaine est une entité logique vue comme une enveloppe étiquetée. Il reflète le plus souvent une organisation hiérarchique dans une entreprise. Par exemple, le domaine " | ||
+ | |||
+ | Le domaine permet à l' | ||
+ | |||
+ | Cette base de données est stockée sur des serveurs particuliers // | ||
+ | \\ | ||
+ | |||
+ | ===== Qu’est-ce qu’un domaine Windows? ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | Dans un groupe de travail Windows, l’accès à un ordinateur exige une authentification par rapport à la base des comptes de l’ordinateur. Cette base est stockée dans un fichier intitulé //SAM// //(Security Account Manager)//. | ||
+ | |||
+ | Si le groupe de travail est constitué de 10 ordinateurs avec un utilisateur par ordinateur et que tous les utilisateurs doivent accéder à tous les ordinateurs, | ||
+ | |||
+ | Pour remédier à cette lourdeur, Microsoft propose d’utiliser un //PDC// //(Primary Domain Controller)// | ||
+ | \\ | ||
+ | |||
+ | ===== Rôle du Contrôleur de Domaine ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | Les contrôleurs de domaine stockent les données et gèrent les interactions entre l' | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Contrôleur primaire de Domaine (PDC) ====== | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | Dans le rôle de // | ||
+ | |||
+ | ===== Mise à jour ===== | ||
+ | |||
+ | Il est fortement recommandé de mettre à jour le //Serveur NethServer// | ||
+ | |||
+ | ===== Fournisseur des comptes ===== | ||
+ | |||
+ | On supprime le fournisseur des comptes actuel - //LDAP//. | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Configuration -> Fournisseur des comptes -> Uninstall**. | ||
+ | |{{ Images_Cahier-301-02-019.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | **Uninstall**. | ||
+ | |{{ Images_Cahier-301-02-020.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | On s' | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-301-02-021.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Vérification de l' | ||
+ | |||
+ | On vérifie la présence des fichiers des exportation. | ||
+ | |||
+ | < | ||
+ | root@tchana ~]# ls -ls / | ||
+ | |||
+ | 4 -rw-r--r-- 1 root root 59 28 nov. 17:30 / | ||
+ | 4 -rw-r--r-- 1 root root 110 28 nov. 17:30 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On affiche le fichier d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | titi Titi Deuxième | ||
+ | admin | ||
+ | michelandre | ||
+ | toto Tot Premier | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On affiche le fichier d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | grp-utilisateurs | ||
+ | domain admins | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Nom de domaine NetBIOS ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | ==== Caractères autorisés ==== | ||
+ | |||
+ | Les noms de domaine //NetBIOS// peuvent contenir tous les caractères alphanumériques à l' | ||
+ | |||
+ | ==== Caractères interdits ==== | ||
+ | |||
+ | Les noms //NetBIOS// des ordinateurs ne peuvent pas contenir les caractères suivants: | ||
+ | |||
+ | - barre oblique inverse // | ||
+ | - barre oblique //(/)// | ||
+ | - deux points //(:)// | ||
+ | - astérisque //(*)// | ||
+ | - point d' | ||
+ | - Guillemet // | ||
+ | - caractère plus petit que //(<)// | ||
+ | - caractère plus grand que //(>)// | ||
+ | - barre verticale //(|)// | ||
+ | |||
+ | Les noms peuvent contenir un point //(.)//. Cependant, le nom ne peut pas commencer par un point. L' | ||
+ | |||
+ | Avec Windows 2000 et les versions ultérieures de Windows, les ordinateurs membres d'un domaine //Active Directory// ne peuvent pas avoir des noms entièrement composés de caractères numériques. Cette restriction est due aux restrictions //DNS//. | ||
+ | |||
+ | ==== Longueur maximale du nom ==== | ||
+ | |||
+ | 15 caractères.\\ | ||
+ | // | ||
+ | |||
+ | ==== Tableau de mots réservés ==== | ||
+ | |||
+ | ^Mots réservés pour les noms^Windows NT 4.0^Windows 2000^Windows Server 2003 et ultérieur| | ||
+ | |ANONYMOUS|X|X|X| | ||
+ | |AUTHENTICATED USER| |X|X| | ||
+ | |BATCH|X|X|X| | ||
+ | |BUILTIN|X|X|X| | ||
+ | |CREATOR GROUP|X|X|X| | ||
+ | |CREATOR GROUP SERVER|X|X|X| | ||
+ | |CREATOR OWNER|X|X|X| | ||
+ | |CREATOR OWNER SERVER|X|X|X| | ||
+ | |DIALUP|X|X|X| | ||
+ | |DIGEST AUTH| | |X| | ||
+ | |INTERACTIVE|X|X|X| | ||
+ | |INTERNET| |X|X| | ||
+ | |LOCAL|X|X|X| | ||
+ | |LOCAL SYSTEM| | |X| | ||
+ | |NETWORK|X|X|X| | ||
+ | |NETWORK SERVICE| | |X| | ||
+ | |NT AUTHORITY|X|X|X| | ||
+ | |NT DOMAIN|X|X|X| | ||
+ | |NTLM AUTH| | |X| | ||
+ | |NULL|X|X|X| | ||
+ | |PROXY| |X|X| | ||
+ | |REMOTE INTERACTIVE| | |X| | ||
+ | |RESTRICTED| |X|X| | ||
+ | |SCHANNEL AUTH| | |X| | ||
+ | |SELF| |X|X| | ||
+ | |SERVER| |X|X| | ||
+ | |SERVICE|X|X|X| | ||
+ | |SYSTEM|X|X|X| | ||
+ | |TERMINAL SERVER| |X|X| | ||
+ | |THIS ORGANIZATION| | |X| | ||
+ | |USERS| | |X| | ||
+ | |WORLD|X|X|X| | ||
+ | |||
+ | ===== Noms de domaine DNS ===== | ||
+ | |||
+ | ==== Caractères autorisés ==== | ||
+ | |||
+ | Les noms //DNS// ne peuvent contenir que des caractères alphabétiques //(A à Z)//, des caractères numériques //(0 à 9)//, le signe moins //(-)// et le point //(.)//. Les caractères de point ne sont autorisés que lorsqu' | ||
+ | |||
+ | Dans le système de noms de domaine Windows 2000 et dans le système //DNS// Microsoft Windows Server 2003, l’utilisation des caractères //Unicode// est prise en charge. Les autres implémentations de //DNS// ne prennent pas en charge les caractères // | ||
+ | |||
+ | ==== Caractères non autorisés ==== | ||
+ | |||
+ | Les noms de domaine //DNS// ne peuvent pas contenir les caractères suivants: | ||
+ | |||
+ | - virgule //(,)// | ||
+ | - tilde //(~)// | ||
+ | - deux points (:) | ||
+ | - point d' | ||
+ | - arobase //(@)// | ||
+ | - signe numérique //(#)// | ||
+ | - signe dollar //($)// | ||
+ | - pour cent //(%)// | ||
+ | - caret //(^)// | ||
+ | - esperluette //(&)// | ||
+ | - apostrophe // | ||
+ | - point //(.)// | ||
+ | - parenthèses //< | ||
+ | - accolades //({})// | ||
+ | - souligner //(_)// | ||
+ | - espace blanc //(vide)// | ||
+ | |||
+ | Le trait de soulignement a un rôle spécial, car il est autorisé pour le premier caractère des enregistrements //SRV// par la définition //RFC//, mais les serveurs //DNS// les plus récents peuvent également le permettre n' | ||
+ | |||
+ | Lors de la promotion d'un nouveau domaine, vous recevez un avertissement indiquant qu'un caractère de soulignement peut entraîner des problèmes avec certains serveurs //DNS//, mais il vous permet de créer le domaine. | ||
+ | |||
+ | ==== Plus de règles ==== | ||
+ | |||
+ | - Tous les caractères conservent leur casse, à l' | ||
+ | - Le premier caractère doit être alphabétique ou numérique. | ||
+ | - Le dernier caractère ne doit pas être un signe moins ou un point. | ||
+ | |||
+ | === Longueur minimale du nom === | ||
+ | |||
+ | 2 caractères. | ||
+ | |||
+ | === Longueur maximale du nom === | ||
+ | |||
+ | 255 caractères. | ||
+ | |||
+ | La longueur maximale du nom d' | ||
+ | |||
+ | Un exemple de chemin dans //SYSVOL// contient: '' | ||
+ | |||
+ | Le nom de domaine //FQDN AD// apparaît deux fois dans le chemin d' | ||
+ | \\ | ||
+ | |||
+ | ===== Installation de modules 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 ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Installation d' | ||
+ | |||
+ | // | ||
+ | |||
+ | <WRAP column 32%> | ||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | L' | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-301-02-022.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Configuration -> Fournisseur des comptes -> Active Directory**. | ||
+ | |{{ Images_Cahier-301-02-023.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-301-02-024.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-301-02-025.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | Peut prendre un certain temps // | ||
+ | |{{ Images_Cahier-301-02-026.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-301-02-027.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Activation de l' | ||
+ | |||
+ | Pour activer le compte **__admin__**, | ||
+ | |||
+ | L' | ||
+ | |||
+ | De plus, un nouvel administrateur a été créé: **__administrator@micronator-dev.org__** / **__Administrator__**. | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | {{Images_icone-201-003_Note.png? | ||
+ | Au bout de la ligne de l' | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-301-02-028.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-301-02-029.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-301-02-030.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | Si on active **//Remote shell (SSH)//**, il faut cliquer **SOUMETTRE** avant de faire quoi que ce soit d' | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Nos deux administrateurs sont activés, car ils n'ont plus de clef accolée à leur nom. | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-301-02-031.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Autres utilisateurs/ | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | [[nethserver_301_cahier_02_active_directoty# | ||
+ | **. | ||
+ | |||
+ | Le répertoire ''/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 20 | ||
+ | 0 drwxr-xr-x 2 root root 114 19 avril 2019 . | ||
+ | 0 drwxr-xr-x 3 root root 54 19 avril 2019 .. | ||
+ | 4 -rwxr-xr-x 1 root root 1322 4 mars 2019 delete_users | ||
+ | 4 -rwxr-xr-x 1 root root 1125 4 mars 2019 fix_migration_home | ||
+ | 4 -rwxr-xr-x 1 root root 2119 4 mars 2019 import_emails | ||
+ | 4 -rwxr-xr-x 1 root root 1398 4 mars 2019 import_groups | ||
+ | 4 -rwxr-xr-x 1 root root 2049 4 mars 2019 import_users | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Importation des utilisateurs ==== | ||
+ | |||
+ | Dans //LDAP//, nous n' | ||
+ | |||
+ | On importe les anciens utilisateurs. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | |||
+ | [INFO] imported titi as titi@micronator-dev.org | ||
+ | [ERROR] Account `admin` user-create event failed. | ||
+ | [INFO] imported michelandre as michelandre@micronator-dev.org | ||
+ | [INFO] imported toto as toto@micronator-dev.org | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | On vérifie. | ||
+ | |||
+ | **Gestion -> Utilisateurs et groupes ->** onglet **Utilisateurs**. | ||
+ | |||
+ | Les utilisateurs ont bien été importés dans //AD//. | ||
+ | |||
+ | À la droite de la ligne de l' | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-301-02-032.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | Décocher **Activer l' | ||
+ | Par défaut, l' | ||
+ | |||
+ | Cocher **Remote Shell (SSH)**. | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-301-02-033.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Importation des groupes ==== | ||
+ | |||
+ | On importe les groupes qui étaient présents dans //LDAP// et qui on été sauvegardés lors de sa suppression. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | |||
+ | [INFO] imported ' | ||
+ | [ERROR] Account `domain admins` group-create event failed. | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | **Gestion -> Utilisateurs et groupes ->** onglet **Groupes ->** vis-à-vis **// | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-301-02-034.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | |{{ Images_Cahier-301-02-035.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Le groupe **__domain admins__** a été recréé par //AD// et il y a insérer l' | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | **Gestion -> Utilisateurs et groupes ->** onglet **Groupes**. | ||
+ | L' | ||
+ | |{{ Images_Cahier-301-02-036.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-301-02-037.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Messagerie électronique ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | Comme on le voit ci-dessous, les répertoires des courriels des utilisateurs n'ont pas été modifiés par l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 4 | ||
+ | 0 drwx------ | ||
+ | 0 drwxr-xr-x. 12 root root 155 19 avril 2019 .. | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | 4 -rw------- | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | __Si vous ne modifiez pas__ le nom de domaine de //LDAP// en installant //AD//, les utilisateurs auront accès à leurs messages qu’ils avaient avec //LDAP//. | ||
+ | |||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-301-02-038.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | [[nethserver_301_cahier_02_active_directoty# | ||
+ | **, nous avions choisi un nom de domaine autre que l' | ||
+ | |||
+ | Avec un changement de nom de domaine, après avoir importé les utilisateurs et les groupes dans //AD//, nous devons importer les répertoires de courriels pour qu'ils indiquent le nouveau nom du domaine //AD//. | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | |||
+ | === Importation des courriels === | ||
+ | |||
+ | <WRAP box> | ||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Répertoires personnels ===== | ||
+ | |||
+ | __Avant__ l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 0 | ||
+ | 0 drwxr-xr-x. | ||
+ | 0 drwxr-xr-x. 12 root | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | __Après__ l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 0 | ||
+ | 0 drwxr-xr-x. | ||
+ | 0 drwxr-xr-x. 12 root root 155 19 avril 2019 .. | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Comme on le voit ci-dessus, l' | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | On se substitue à l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# su - admin | ||
+ | |||
+ | Creating home directory for admin@micronator-dev.org. | ||
+ | [admin@micronator-dev.org@tchana ~]$ | ||
+ | </ | ||
+ | |||
+ | Le système affiche qu'il a créé le répertoire personnel de l' | ||
+ | |||
+ | On revient à l' | ||
+ | |||
+ | < | ||
+ | [admin@micronator-dev.org@tchana ~]$ exit | ||
+ | |||
+ | déconnexion | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On affiche les répertoires personnels. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 0 | ||
+ | 0 drwxr-xr-x. | ||
+ | 0 drwxr-xr-x. 12 root | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Le système a créé le répertoire personnel de l' | ||
+ | |||
+ | ==== Ajustement propriétaire: | ||
+ | |||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | On se rend dans le dossier des répertoires personnels. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cd / | ||
+ | |||
+ | [root@tchana home]# | ||
+ | </ | ||
+ | |||
+ | On vérifie les chemins des répertoire personnels contenus dans //AD//. | ||
+ | |||
+ | < | ||
+ | [root@tchana home]# getent passwd * | cut -f6 -d: | ||
+ | |||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | [root@tchana home]# | ||
+ | </ | ||
+ | |||
+ | On affiche tous les utilisateurs. | ||
+ | |||
+ | < | ||
+ | [root@tchana home]# getent passwd * | cut -f6 -d: | cut -f6 -d/ | ||
+ | |||
+ | admin | ||
+ | michelandre | ||
+ | titi | ||
+ | toto | ||
+ | [root@tchana home]# | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | [root@tchana home]# cd | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Vu les commandes ci-dessus, nous avons assez d' | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | #!/bin/bash | ||
+ | |||
+ | # Mettre le script dans: /root/ | ||
+ | # chmod +x / | ||
+ | # Exécuter: / | ||
+ | |||
+ | cd / | ||
+ | |||
+ | getent passwd * | cut -f6 -d: | cut -f6 -d/ > temp.txt | ||
+ | |||
+ | while read p; do | ||
+ | chown -R $p@micronator-dev.org:" | ||
+ | done < | ||
+ | |||
+ | rm -rf temp.txt | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On rend le script exécutable par **__root__** seulement. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# chmod 700 / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als dir.sh | ||
+ | |||
+ | 4 -rwx------ 1 root root 302 28 nov. 18:10 dir.sh | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On lance la commande d' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie le résultat. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | total 0 | ||
+ | 0 drwxr-xr-x. | ||
+ | 0 drwxr-xr-x. 12 root | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | 0 drwx------ | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | === Substitution à l' | ||
+ | |||
+ | Si ce n'est déjà fait, on édite l' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | Dans l' | ||
+ | |||
+ | On décoche **//Activer l' | ||
+ | |||
+ | On coche **//Remote Shell (SSH)//**. | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | </ | ||
+ | <WRAP column 62%> | ||
+ | |{{ Images_Cahier-301-02-039.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | On se substitue à l' | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# su - toto | ||
+ | |||
+ | [toto@micronator-dev.org@tchana ~]$ | ||
+ | </ | ||
+ | |||
+ | Aucune erreur. | ||
+ | |||
+ | On affiche dans quel répertoire se trouve l' | ||
+ | |||
+ | < | ||
+ | [toto@micronator-dev.org@tchana ~]$ pwd | ||
+ | |||
+ | / | ||
+ | [toto@micronator-dev.org@tchana ~]$ | ||
+ | </ | ||
+ | |||
+ | L' | ||
+ | |||
+ | On affiche le contenu de son répertoire personnel. | ||
+ | |||
+ | < | ||
+ | [toto@micronator-dev.org@tchana ~]$ ls -als | ||
+ | |||
+ | total 16 | ||
+ | 0 drwx------ | ||
+ | 0 drwxr-xr-x. 6 root root 62 28 nov. 18:11 .. | ||
+ | 4 -rw------- | ||
+ | 4 -rw------- | ||
+ | 4 -rw------- | ||
+ | 4 -rw------- | ||
+ | [toto@micronator-dev.org@tchana ~]$ | ||
+ | </ | ||
+ | |||
+ | Il peut voir tout le contenu de son répertoire personnel. Tous ses anciens fichiers sont là. | ||
+ | |||
+ | On retourne à l' | ||
+ | |||
+ | < | ||
+ | [toto@micronator-dev.org@tchana ~]$ exit | ||
+ | |||
+ | déconnexion | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | Aucune erreur, tout s'est bien passé. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Serveur DNS attribué par DHCP ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | {{Images_Cahier-101-03-003.png? | ||
+ | [[nethserver_301_cahier_02_active_directoty# | ||
+ | **. | ||
+ | |||
+ | <WRAP column 32%> | ||
+ | ==== Ajustement du serveur DHCP ==== | ||
+ | |||
+ | **Configuration -> DHCP ->** onglet **Serveur DHCP**. | ||
+ | |||
+ | On ajuste les paramètres du serveur //DHCP// pour que celui-ci fournisse la bonne adresse //IP// des serveurs //DNS / Wins//. | ||
+ | |||
+ | **SOUMETTRE**. | ||
+ | </ | ||
+ | <WRAP column 60%> | ||
+ | |{{ Images_Cahier-301-02-040.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Configuration de la carte réseau de la station ===== | ||
+ | |||
+ | On s' | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-301-02-041.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **Modifier les paramètres de la carte**. | ||
+ | |{{ Images_Cahier-301-02-042.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | Double-cliquer sur l' | ||
+ | |{{ Images_Cahier-301-02-043.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Détails...** | ||
+ | |{{ Images_Cahier-301-02-044.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-301-02-045.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | \\ | ||
+ | **Fermer** toutes les fenêtres. | ||
+ | |{{ Images_Cahier-301-02-046.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Quelques paramètres du fournisseur des comptes AD ===== | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# account-provider-test dump | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | |||
+ | ===== Ajustement de Self Service Password pour AD ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | [[nethserver_301_cahier_03_self_service_password_active_directory|Cahier-03: | ||
+ | ** //Self Service Password & Active Directory// du "Cours NethServe-301" | ||
+ | \\ | ||
+ | |||
+ | ===== Instantané VirtualBox ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-004.png? | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Changement des mots de passe ====== | ||
+ | |||
+ | ===== Prérequis ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | Veillez consulter le | ||
+ | ** | ||
+ | [[nethserver_301_cahier_03_self_service_password_active_directory|Cahier-03: | ||
+ | ** //Self Service Password & Active Directory// du "Cours NethServe-301" | ||
+ | \\ | ||
+ | |||
+ | ===== Téléversement du fichier d' | ||
+ | |||
+ | On doit copier le fichier ''/ | ||
+ | [[nethserver_301_cahier_02_active_directoty# | ||
+ | **, contenant les Question/ | ||
+ | |||
+ | On copie le fichier ''/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cp / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -ls / | ||
+ | |||
+ | 4 -rw-r--r-- 1 root root 337 1 déc. 10:08 exportation.ldif | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Importation ===== | ||
+ | |||
+ | // | ||
+ | |||
+ | On importe les Question/ | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | | ||
+ | -t / | ||
+ | -H / | ||
+ | / | ||
+ | |||
+ | Modified 3 records successfully | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Les Question/ | ||
+ | \\ | ||
+ | |||
+ | ===== Suppression du fichier file.ldif ===== | ||
+ | |||
+ | {{Images_Cahier-101-03-008.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# rm -rf / | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | ls: impossible d' | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ===== Changement du mot de passe par question ===== | ||
+ | |||
+ | ==== Exemple avec l' | ||
+ | |||
+ | Vu que l' | ||
+ | |||
+ | <WRAP column 55%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-301-02-047.png? | ||
+ | </ | ||
+ | <WRAP column 37%> | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | L' | ||
+ | |{{ Images_Cahier-301-02-048.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | Pour vérifier son nouveau mot de passe, l' | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | L' | ||
+ | |{{ Images_Cahier-301-02-049.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | Le nouveau mot de passe de l' | ||
+ | |{{ Images_Cahier-301-02-050.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Autres utilisateurs ==== | ||
+ | |||
+ | Tous les autres utilisateurs exécutent les mêmes manipulations que celles utilisées par **'' | ||
+ | \\ | ||
+ | |||
+ | < | ||
+ | <div align=" | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ====== Certificat Let's Encrypt ====== | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | Il nous faut ajuster le certificat // | ||
+ | |||
+ | ===== Ajout de CNAME chez le régistraire du domaine ===== | ||
+ | |||
+ | Affichage des **CNAME** + **FQDN** de notre domaine. Le nom **tchana** est celui de notre //Serveur NethServer// | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# account-provider-test dump | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | {{ Images_Cahier-301-02-051.png? | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | {{ Images_Cahier-301-02-052.png? | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | {{ Images_Cahier-301-02-053.png? | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | {{ Images_Cahier-301-02-054.png? | ||
+ | \\ | ||
+ | |||
+ | Pour plus de détails, voir le chapitre ** | ||
+ | [[nethserver_101_cahier_05_vdsl_fqdn_internet_et_nethserver# | ||
+ | ** dans le **Cahier-05: | ||
+ | |||
+ | Voir aussi le chapitre ** | ||
+ | [[nethserver_101_cahier_04_local_certificat_let_encrypt# | ||
+ | ** dans le **Cahier-04: | ||
+ | \\ | ||
+ | |||
+ | ===== Serveur sur un réseau LOCAL ===== | ||
+ | |||
+ | Voir le chapitre ** | ||
+ | [[nethserver_101_cahier_04_local_certificat_let_encrypt# | ||
+ | ** dans le **Cahier-04: | ||
+ | |||
+ | Pour la demande du certificat // | ||
+ | |||
+ | ==== Certificat de test (--test) ==== | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | --issue | ||
+ | --dns dns_cf | ||
+ | -d micronator-dev.org | ||
+ | -d www.micronator-dev.org | ||
+ | -d mail.micronator-dev.org | ||
+ | -d wpad.micronator-dev.org | ||
+ | -d ad.micronator-dev.org | ||
+ | -d nscd-tchana.ad.micronator-dev.org | ||
+ | -d adserver.ad.micronator-dev.org | ||
+ | --cert-file / | ||
+ | --ca-file / | ||
+ | --key-file / | ||
+ | --reloadcmd "/ | ||
+ | --test | ||
+ | |||
+ | ... | ||
+ | [sam. déc. 7 12:02:55 EST 2019] Your cert is in / | ||
+ | [sam. déc. 7 12:02:55 EST 2019] Your cert key is in / | ||
+ | [sam. déc. 7 12:02:55 EST 2019] The intermediate CA cert is in / | ||
+ | [sam. déc. 7 12:02:55 EST 2019] And the full chain certs is there: | ||
+ | [sam. déc. 7 12:02:55 EST 2019] Installing cert to:/ | ||
+ | [sam. déc. 7 12:02:55 EST 2019] Installing CA to:/ | ||
+ | [sam. déc. 7 12:02:55 EST 2019] Installing key to:/ | ||
+ | [sam. déc. 7 12:02:55 EST 2019] Run reload cmd: / | ||
+ | [sam. déc. 7 12:02:59 EST 2019] Reload success | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Certificat officiel ==== | ||
+ | |||
+ | La demande d'un certificat de //test// est réussie, on peut demander un certificat // | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# / | ||
+ | --issue | ||
+ | --dns dns_cf | ||
+ | -d micronator-dev.org | ||
+ | -d www.micronator-dev.org | ||
+ | -d mail.micronator-dev.org | ||
+ | -d wpad.micronator-dev.org | ||
+ | -d ad.micronator-dev.org | ||
+ | -d nscd-tchana.ad.micronator-dev.org | ||
+ | -d adserver.ad.micronator-dev.org | ||
+ | --cert-file / | ||
+ | --ca-file / | ||
+ | --key-file / | ||
+ | --reloadcmd "/ | ||
+ | --force | ||
+ | |||
+ | ... | ||
+ | [sam. déc. 7 12:17:12 EST 2019] Your cert is in / | ||
+ | [sam. déc. 7 12:17:12 EST 2019] Your cert key is in / | ||
+ | [sam. déc. 7 12:17:12 EST 2019] The intermediate CA cert is in / | ||
+ | [sam. déc. 7 12:17:12 EST 2019] And the full chain certs is there: | ||
+ | [sam. déc. 7 12:17:12 EST 2019] Installing cert to:/ | ||
+ | [sam. déc. 7 12:17:12 EST 2019] Installing CA to:/ | ||
+ | [sam. déc. 7 12:17:12 EST 2019] Installing key to:/ | ||
+ | [sam. déc. 7 12:17:12 EST 2019] Run reload cmd: / | ||
+ | [sam. déc. 7 12:17:15 EST 2019] Reload success | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Vérification ==== | ||
+ | |||
+ | === À la console du serveur === | ||
+ | |||
+ | Certificat publique. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 4 -rw-r--r-- 1 root root 2143 7 déc. 12:17 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Chaîne de certification. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 4 -rw-r--r-- 1 root root 1648 7 déc. 12:17 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | Clé privée. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 4 -rw------- 1 root root 1679 7 déc. 12:17 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | === Avec un navigateur === | ||
+ | |||
+ | On se rend à https:// | ||
+ | |||
+ | Il n'est pas nécessaire d' | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | On clique le **cadenas** pour afficher les informations de la connexion puis, on clique l' | ||
+ | |{{ Images_Cahier-301-02-055.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | \\ | ||
+ | **Plus d' | ||
+ | |{{ Images_Cahier-301-02-056.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | Afficher le certificat. | ||
+ | |{{ Images_Cahier-301-02-057.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | Tous nos //CNAME// sont présents. | ||
+ | |{{ Images_Cahier-301-02-058.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | \\ | ||
+ | |||
+ | ===== Renouvellement ===== | ||
+ | |||
+ | À chaque jour, une tâche //cron// vérifie le nombre de jours restant pour la validité. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# crontab -l | ||
+ | |||
+ | 56 0 * * * "/ | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | < | ||
+ | <div align=" | ||
+ | <b>Le certificat < | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ===== Serveur branché directement à l' | ||
+ | |||
+ | ==== Répertoire well-known ==== | ||
+ | |||
+ | // | ||
+ | Référence: | ||
+ | |||
+ | * Pour un serveur branché directement à l' | ||
+ | |||
+ | * On peut faire la demande de certificat à la page de l' | ||
+ | |||
+ | * Pour plus de détails, voir le ** | ||
+ | [[nethserver_101_cahier_05_vdsl_fqdn_internet_et_nethserver|Cahier-05: | ||
+ | ** // | ||
+ | |||
+ | Pour ce genre de serveur, nous devons créer un fichier ''/ | ||
+ | |||
+ | === Création du fichier z_well-known.conf === | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | < | ||
+ | cat > / | ||
+ | Alias "/ | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | EOT | ||
+ | |||
+ | </ | ||
+ | |||
+ | On vérifie. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# ls -als / | ||
+ | |||
+ | 4 -rw-r--r-- 1 root root 231 7 déc. 13:46 / | ||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | On affiche le contenu du fichier. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# cat / | ||
+ | |||
+ | Alias "/ | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | === Sauvegarde du fichier === | ||
+ | |||
+ | On vérifie si le nom du fichier ''/ | ||
+ | |||
+ | {{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 ''/ | ||
+ | |||
+ | === Redémarrage du démon httpd === | ||
+ | |||
+ | On redémarre le démon //Apache// afin qu'il relise ses fichiers de configuration. | ||
+ | |||
+ | < | ||
+ | [root@tchana ~]# systemctl restart httpd | ||
+ | |||
+ | [root@tchana ~]# | ||
+ | </ | ||
+ | |||
+ | ==== Demande d'un nouveau certificat Let's Encrypt ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | <WRAP column 46%> | ||
+ | **Configuration -> Certificat du serveur ->** on déroule le menu **-> Requête de certificat Let's Encrypt**. | ||
+ | |{{ Images_Cahier-301-02-059.png? | ||
+ | </ | ||
+ | <WRAP column 46%> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-301-02-060.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | ==== Certificat par défaut ==== | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | |||
+ | <WRAP column 62%> | ||
+ | < | ||
+ | < | ||
+ | |{{ Images_Cahier-301-02-061.png? | ||
+ | </ | ||
+ | <WRAP column 30%> | ||
+ | \\ | ||
+ | **CONFIRM**. | ||
+ | |{{ Images_Cahier-301-02-062.png? | ||
+ | </ | ||
+ | <WRAP clear></ | ||
+ | |||
+ | {{Images_Cahier-101-03-006.png? | ||
+ | |||
+ | {{ Images_Cahier-301-02-063.png? | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | [[nethserver_101_cahier_05_vdsl_fqdn_internet_et_nethserver# | ||
+ | ** dans le **Cahier-05: | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ====== Appendices ====== | ||
+ | |||
+ | {{Images_icone-201-003_Note.png? | ||
+ | [[nethserver_201_cahier_04_dokuwiki# | ||
+ | ** du **Cahier-201-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-10-02|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, | ||
+ | \\ | ||
+ | \\ |