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 | ||
elearning:workbooks:debian:6:avance:l130:part1 [2022/02/08 08:12] – admin | elearning:workbooks:debian:6:avance:l130:part1 [2023/08/25 01:25] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
- | Version : **2022.01**. | + | Version : **2023.02**. |
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ====== | + | ====== |
=====Contenu du Module===== | =====Contenu du Module===== | ||
- | * **DOF501 | + | * **LCF801 |
* Contenu du Module | * Contenu du Module | ||
* Qu' | * Qu' | ||
Ligne 26: | Ligne 26: | ||
* ne nécessite ni l' | * ne nécessite ni l' | ||
* utilise le langage **YAML** (**Y**et **A**other **M**arkup **L**anguage), | * utilise le langage **YAML** (**Y**et **A**other **M**arkup **L**anguage), | ||
+ | |||
+ | {{ : | ||
=====LAB #1 - Installation d' | =====LAB #1 - Installation d' | ||
- | Connectez-vous à la VM Ansible | + | Connectez-vous à la à **centos8** |
< | < | ||
- | trainee@traineeXX: | + | trainee@traineeXX: |
+ | The authenticity of host ' | ||
+ | ECDSA key fingerprint is SHA256: | ||
+ | Are you sure you want to continue connecting (yes/no)? yes | ||
+ | Warning: Permanently added ' | ||
+ | trainee@10.0.2.45' | ||
+ | Activate the web console with: systemctl enable --now cockpit.socket | ||
+ | |||
+ | Last login: Sun Mar 6 12:00:35 2022 from 10.0.2.1 | ||
+ | [trainee@centos8 ~]$ | ||
</ | </ | ||
- | Pour obtenir la dernière version d' | + | Pour obtenir la dernière version d' |
- | < | + | < |
- | trainee@ansible:~$ su - | + | [trainee@centos8 |
- | Mot de passe : fenestros | + | Password: fenestros |
- | root@ansible:~# apt-get | + | |
- | ... | + | [root@centos8 |
- | root@ansible:~# apt-get install python3-pip | + | Last metadata expiration check: 0:19:03 ago on Tue 08 Mar 2022 10:30:01 EST. |
- | ... | + | Dependencies resolved. |
- | root@ansible:~# pip3 -V | + | Nothing to do. |
- | pip 9.0.1 from / | + | Complete! |
- | root@ansible:~# pip3 list | + | |
+ | [root@centos8 | ||
+ | Last metadata expiration check: 0:19:29 ago on Tue 08 Mar 2022 10:30:01 EST. | ||
+ | Package python3-pip-9.0.3-20.el8.noarch is already installed. | ||
+ | Dependencies resolved. | ||
+ | Nothing to do. | ||
+ | Complete! | ||
+ | |||
+ | [root@centos8 | ||
+ | pip 9.0.3 from / | ||
+ | |||
+ | [root@centos8 | ||
DEPRECATION: | DEPRECATION: | ||
- | Brlapi (0.6.5) | + | blivet (3.4.0) |
- | chardet (2.3.0) | + | Brlapi (0.6.7) |
- | cryptography | + | chardet (3.0.4) |
+ | chrome-gnome-shell | ||
+ | configobj (5.0.6) | ||
cupshelpers (1.0) | cupshelpers (1.0) | ||
- | httplib2 | + | dasbus |
- | idna (2.2) | + | dbus-python (1.2.4) |
- | keyring | + | decorator (4.2.1) |
- | keyrings.alt (1.3) | + | docutils (0.14) |
- | louis (3.0.0) | + | ethtool (0.14) |
- | pip (9.0.1) | + | gpg (1.13.1) |
- | pyasn1 | + | html5lib (0.999999999) |
- | pycrypto | + | idna (2.5) |
- | pycups (1.9.73) | + | iniparse (0.4) |
- | pycurl (7.43.0) | + | initial-setup (0.3.81.7) |
- | pygobject (3.22.0) | + | isc (2.0) |
- | pysmbc | + | langtable |
- | python-apt (1.4.3) | + | libcomps (0.1.16) |
- | python-debian | + | lxml (4.2.3) |
- | python-debianbts | + | nftables |
+ | ntplib (0.3.3) | ||
+ | ordered-set | ||
+ | perf (0.1) | ||
+ | pexpect (4.3.1) | ||
+ | pid (2.1.1) | ||
+ | pip (9.0.3) | ||
+ | ply (3.9) | ||
+ | productmd (1.11) | ||
+ | psutil | ||
+ | ptyprocess (0.5.2) | ||
+ | pwquality (1.4.4) | ||
+ | pycairo (1.16.3) | ||
+ | pycups (1.9.72) | ||
+ | pycurl (7.43.0.2) | ||
+ | pydbus (0.6.0) | ||
+ | pyenchant (2.0.0) | ||
+ | pygobject (3.28.3) | ||
+ | pyinotify (0.9.6) | ||
+ | pykickstart | ||
+ | pyparsing (2.1.10) | ||
+ | pyparted (3.11.7) | ||
+ | PySocks (1.6.8) | ||
+ | python-dateutil | ||
+ | python-dmidecode (3.12.2) | ||
+ | python-linux-procfs | ||
+ | python-meh (0.47.2) | ||
+ | pytz (2017.2) | ||
+ | pyudev (0.21.0) | ||
pyxdg (0.25) | pyxdg (0.25) | ||
- | reportbug | + | PyYAML |
- | requests (2.12.4) | + | requests (2.20.0) |
- | SecretStorage | + | requests-file (1.4.3) |
- | setuptools (33.1.1) | + | requests-ftp (0.3.1) |
- | six (1.10.0) | + | rpm (4.14.3) |
- | urllib3 | + | schedutils (0.6) |
- | wheel (0.29.0) | + | selinux |
+ | sepolicy (1.1) | ||
+ | setools (4.3.0) | ||
+ | setroubleshoot (1.1) | ||
+ | setuptools (39.2.0) | ||
+ | simpleline (1.1.1) | ||
+ | six (1.11.0) | ||
+ | slip (0.6.4) | ||
+ | slip.dbus (0.6.4) | ||
+ | sos (4.1) | ||
+ | SSSDConfig (2.5.2) | ||
+ | subscription-manager (1.28.21) | ||
+ | syspurpose | ||
+ | systemd-python (234) | ||
+ | urllib3 (1.24.2) | ||
+ | webencodings (0.5.1) | ||
+ | |||
+ | [root@centos8 ~]# python3 -m pip install --upgrade pip | ||
+ | WARNING: Running pip install with root privileges is generally not a good idea. Try `__main__.py install --user` instead. | ||
+ | Collecting pip | ||
+ | Downloading https:// | ||
+ | 100% |████████████████████████████████| 1.7MB 747kB/s | ||
+ | Installing collected packages: pip | ||
+ | Successfully installed pip-21.3.1 | ||
+ | </ | ||
+ | |||
+ | Dernièrement, | ||
+ | |||
+ | < | ||
+ | [root@centos8 ~]# dnf module -y install python38 | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important> |
**Important** : Pip3 est le gestionnaire des paquets pour Python 3.5. La commande est disponible en tant que pip3 ou pip sous Linux, Mac et Windows(r). | **Important** : Pip3 est le gestionnaire des paquets pour Python 3.5. La commande est disponible en tant que pip3 ou pip sous Linux, Mac et Windows(r). | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important> |
**Important** : Notez que le mot de passe **fenestros** ne sera pas en clair. | **Important** : Notez que le mot de passe **fenestros** ne sera pas en clair. | ||
</ | </ | ||
- | Utilisez ensuite | + | Utilisez ensuite |
< | < | ||
- | trainee@ansible:~$ pip3 install ansible | + | [trainee@centos8 |
- | Collecting ansible | + | |
- | Downloading https:// | + | |
- | 100% |████████████████████████████████| 31.2MB 42kB/s | + | |
- | Collecting ansible-base< | + | |
- | Downloading https:// | + | |
- | 100% |████████████████████████████████| 5.7MB 224kB/s | + | |
- | Collecting PyYAML (from ansible-base< | + | |
- | Downloading https:// | + | |
- | 100% |████████████████████████████████| 276kB 4.1MB/s | + | |
- | Collecting cryptography (from ansible-base< | + | |
- | Downloading https:// | + | |
- | 100% |████████████████████████████████| 2.7MB 496kB/s | + | |
- | Collecting jinja2 (from ansible-base< | + | |
- | Downloading https:// | + | |
- | 100% |████████████████████████████████| 133kB 7.4MB/s | + | |
- | Collecting packaging (from ansible-base< | + | |
- | Downloading https:// | + | |
- | 100% |████████████████████████████████| 40kB 7.4MB/s | + | |
- | Collecting six> | + | |
- | Downloading https:// | + | |
- | Collecting cffi!=1.11.3,> | + | |
- | Downloading https:// | + | |
- | 100% |████████████████████████████████| 409kB 3.1MB/s | + | |
- | Collecting MarkupSafe> | + | |
- | Downloading https:// | + | |
- | Collecting pyparsing> | + | |
- | Downloading https:// | + | |
- | 100% |████████████████████████████████| 71kB 6.9MB/s | + | |
- | Collecting pycparser (from cffi!=1.11.3,> | + | |
- | Downloading https:// | + | |
- | 100% |████████████████████████████████| 112kB 7.6MB/s | + | |
- | Building wheels for collected packages: ansible, ansible-base, | + | |
- | Running setup.py bdist_wheel for ansible ... / | + | |
- | done | + | |
- | Stored in directory: / | + | |
- | Running setup.py bdist_wheel for ansible-base ... done | + | |
- | Stored in directory: / | + | |
- | Running setup.py bdist_wheel for PyYAML ... done | + | |
- | Stored in directory: / | + | |
- | Successfully built ansible ansible-base PyYAML | + | |
- | Installing collected packages: PyYAML, six, pycparser, cffi, cryptography, | + | |
- | Successfully installed MarkupSafe-1.1.1 PyYAML-5.3.1 ansible-3.1.0 ansible-base-2.10.7 cffi-1.14.5 cryptography-3.2.1 jinja2-2.11.3 packaging-20.9 pycparser-2.20 pyparsing-2.4.7 six-1.15.0 | + | |
</ | </ | ||
Ligne 136: | Ligne 175: | ||
< | < | ||
- | root@ansible:~# ansible --version | + | [trainee@centos8 |
- | ansible 2.10.9 | + | ansible |
config file = None | config file = None | ||
- | configured module search path = ['/root/ | + | configured module search path = ['/home/ |
- | ansible python module location = / | + | ansible python module location = / |
+ | ansible collection location = / | ||
executable location = / | executable location = / | ||
- | python version = 3.5.3 (default, | + | python version = 3.6.8 (default, |
+ | jinja version = 3.0.3 | ||
+ | libyaml = True | ||
</ | </ | ||
- | |||
- | Il existe un bug dans la version 3.5.3 de Python sous Debian 9. Ceci peut être corrigé en modifiant les lignes 109 et 117 dans le fichier **/ | ||
- | |||
- | < | ||
- | root@ansible: | ||
- | root@ansible: | ||
- | ... | ||
- | #def remove(wr, selfref=ref(self)): | ||
- | def remove(wr, selfref=ref(self), | ||
- | ... | ||
- | # | ||
- | _atomic_removal(d, | ||
- | ... | ||
- | </ | ||
- | |||
- | <WRAP center round important 60%> | ||
- | **Important** : N' | ||
- | </ | ||
=====LAB #2 - Configuration de ssh et de sudo===== | =====LAB #2 - Configuration de ssh et de sudo===== | ||
Ligne 167: | Ligne 191: | ||
====2.1 - ssh==== | ====2.1 - ssh==== | ||
- | Ansible a besoin d'une configuration par clef asymétrique avec la machine **TargetA** afin de fonctionner correctement. Dans cette configuration : | + | Ansible a besoin d'une configuration par clef asymétrique avec la machine **targeta** afin de fonctionner correctement. Dans cette configuration : |
- | * La machine **Ansible** envoie à la machine **TargetA** une requête d' | + | * La machine **centos8** envoie à la machine **targeta** une requête d' |
- | * La machine **TargetA** recherche une correspondance pour ce module dans le fichier des clés autorisés **~/ | + | * La machine **targeta** recherche une correspondance pour ce module dans le fichier des clés autorisés **~/ |
- | * Dans le cas où une correspondance n'est pas trouvée, la machine **TargetA** met fin à la communication, | + | * Dans le cas où une correspondance n'est pas trouvée, la machine **targeta** met fin à la communication, |
- | * Dans le cas contraire la machine **TargetA** génère une chaîne aléatoire de 256 bits appelée un **challenge** et la chiffre avec la **clé publique de la machine | + | * Dans le cas contraire la machine **targeta** génère une chaîne aléatoire de 256 bits appelée un **challenge** et la chiffre avec la **clé publique de la machine |
- | * La machine **Ansible** reçoit le challenge et le décrypte avec la partie privée de sa clé. Il combine le challenge avec l' | + | * La machine **centos8** reçoit le challenge et le décrypte avec la partie privée de sa clé. Il combine le challenge avec l' |
- | * La machine **TargetA** génère le même haché et le compare avec celui reçu de la machine **Ansible**. Si les deux hachés sont identiques, l' | + | * La machine **targeta** génère le même haché et le compare avec celui reçu de la machine **centos8**. Si les deux hachés sont identiques, l' |
- | Saisissez maintenant les commandes suivantes en tant que **trainee** dans la machine **Ansible** : | + | Saisissez maintenant les commandes suivantes en tant que **trainee** dans la machine **centos8** : |
- | <WRAP center round important | + | <WRAP center round important> |
**Important** - Lors de la génération des clefs, la passphrase doit être **vide**. | **Important** - Lors de la génération des clefs, la passphrase doit être **vide**. | ||
</ | </ | ||
< | < | ||
- | root@ansible: | + | [trainee@centos8 |
- | déconnexion | + | |
- | trainee@ansible:~$ ssh-keygen -t rsa | + | |
Generating public/ | Generating public/ | ||
Enter file in which to save the key (/ | Enter file in which to save the key (/ | ||
- | Created directory '/ | ||
Enter passphrase (empty for no passphrase): | Enter passphrase (empty for no passphrase): | ||
Enter same passphrase again: | Enter same passphrase again: | ||
Ligne 194: | Ligne 215: | ||
Your public key has been saved in / | Your public key has been saved in / | ||
The key fingerprint is: | The key fingerprint is: | ||
- | SHA256:JQNe6n1PZphil37Akn1uO5A8e/4MhhIAb99T70ffo8Y | + | SHA256:mgCPKDg5NBf68IbtjUqbvCVLrDf4nw2C6QdIQRgF/aY trainee@centos8.ittraining.loc |
The key's randomart image is: | The key's randomart image is: | ||
- | +---[RSA | + | +---[RSA |
- | | . . . | + | |=*.. |
- | | + + | | + | |..o . |
- | | * o . . | + | | =oo | |
- | | | + | |o+O+o |
- | | . S.%.= . .| | + | |X..Bo S | |
- | | . B=@ . .o| | + | |+*E o. o |
- | | | + | |o*o+..o |
- | | ..+oE...| | + | |B Xo + |
- | | o++o | + | |.@+oo . |
+----[SHA256]-----+ | +----[SHA256]-----+ | ||
- | trainee@ansible:~$ ssh-keygen -t ecdsa | + | [trainee@centos8 |
Generating public/ | Generating public/ | ||
Enter file in which to save the key (/ | Enter file in which to save the key (/ | ||
Ligne 215: | Ligne 236: | ||
Your public key has been saved in / | Your public key has been saved in / | ||
The key fingerprint is: | The key fingerprint is: | ||
- | SHA256:Ir3cEmFZND2AyFqQ2n65dXOPlSAB1BzzkzR3ViI+OYc | + | SHA256:X2O1yKIbbCmNcIrnB9vYd2Tn8S8zISf/ |
The key's randomart image is: | The key's randomart image is: | ||
+---[ECDSA 256]---+ | +---[ECDSA 256]---+ | ||
- | | .+ oo*B+o o +..| | ||
- | | . + .o+=o= * . | | ||
- | | o o + .+.E . | | ||
- | |. o o .. .. + | | ||
- | | . ..+ S. . . | | ||
- | | . oo.=o . o | | ||
- | | . o+..o + | | ||
- | | . . . . | | ||
| | | | | | ||
+ | | | | ||
+ | | . | | ||
+ | | . o . | | ||
+ | | . . S . * . | | ||
+ | | ..+ + +o+=.o o| | ||
+ | | . o*o Bo.o B +B| | ||
+ | | oo +o.o. . *+@| | ||
+ | | .. ... OE| | ||
+----[SHA256]-----+ | +----[SHA256]-----+ | ||
- | trainee@ansible:~$ ssh-keygen -t ed25519 | + | [trainee@centos8 |
Generating public/ | Generating public/ | ||
Enter file in which to save the key (/ | Enter file in which to save the key (/ | ||
Ligne 236: | Ligne 257: | ||
Your public key has been saved in / | Your public key has been saved in / | ||
The key fingerprint is: | The key fingerprint is: | ||
- | SHA256:HGNyqw1PwiaV9LOHg2oYFNasG8T67jTKdv+Hw/ | + | SHA256:nLP4esR7UmNsc6dAqmDUufS8ORxCCI+LpaE04sXAwZw |
The key's randomart image is: | The key's randomart image is: | ||
+--[ED25519 256]--+ | +--[ED25519 256]--+ | ||
- | | .oo | + | |+.o | |
- | | .o.o. o | | + | | E. | |
- | | o.. + B | + | | o+ o . | |
- | |..o o * B | | + | |oooo+ =. .. |
- | | ..o. * S . | | + | |==oo o =S+ | |
- | | oo + B o | | + | |+.. o o.BoO . . | |
- | | .+ o o +. | | + | | |
- | |.+.+ =...o | | + | | ..O . . | |
- | |ooo ..o.+E=. | | + | | .o.+ |
+----[SHA256]-----+ | +----[SHA256]-----+ | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important> |
**Important** - Les clés générées seront placées dans le répertoire **~/ | **Important** - Les clés générées seront placées dans le répertoire **~/ | ||
</ | </ | ||
Ligne 258: | Ligne 279: | ||
< | < | ||
- | trainee@ansible:~$ cat .ssh/ | + | [trainee@centos8 |
- | trainee@ansible:~$ cat .ssh/ | + | [trainee@centos8 |
- | trainee@ansible:~$ cat .ssh/ | + | [trainee@centos8 |
- | trainee@ansible:~$ cat .ssh/ | + | [trainee@centos8 |
- | ssh-rsa | + | ssh-rsa |
- | ecdsa-sha2-nistp256 | + | ecdsa-sha2-nistp256 |
- | ssh-ed25519 | + | ssh-ed25519 |
</ | </ | ||
- | Il convient maintenant de se connecter sur la machine **TargetA** en utilisant ssh et de vérifier la présence du répertoire ~/ | + | Il convient maintenant de se connecter sur la machine **targeta** en utilisant ssh et de créer le répertoire ~/.ssh : |
- | + | ||
- | En saisissant cette commande, vous obtiendrez une fenêtre similaire à celle-ci | + | |
< | < | ||
- | trainee@ansible:~$ ssh -l trainee | + | [trainee@centos8 |
- | The authenticity of host 'targeta.i2tch.loc (10.0.2.52)' | + | The authenticity of host '10.0.2.52 (10.0.2.52)' |
ECDSA key fingerprint is SHA256: | ECDSA key fingerprint is SHA256: | ||
- | Are you sure you want to continue connecting (yes/no)? yes | + | Are you sure you want to continue connecting (yes/no/ |
- | Warning: Permanently added 'targeta.i2tch.loc, | + | Warning: Permanently added ' |
Debian GNU/Linux 9 | Debian GNU/Linux 9 | ||
- | trainee@targeta.i2tch.loc's password: | + | trainee@10.0.2.52's password: |
Linux targeta.i2tch.loc 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 | Linux targeta.i2tch.loc 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 | ||
Ligne 287: | Ligne 306: | ||
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent | Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent | ||
permitted by applicable law. | permitted by applicable law. | ||
- | Last login: Sun Mar 21 13:34:13 2021 from 10.0.2.17 | + | Last login: Sun Mar 21 08:47:45 2021 from 10.0.2.10 |
- | trainee@targeta: | + | trainee@targeta: |
drwx------ | drwx------ | ||
trainee@targeta: | trainee@targeta: | ||
déconnexion | déconnexion | ||
- | Connection to targeta.i2tch.loc closed. | + | Connection to 10.0.2.52 closed. |
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important> |
- | **Important** | + | **Important** |
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important> |
- | **Important** | + | **Important** |
</ | </ | ||
- | Ensuite, il convient de transférer le fichier **.ssh/ | + | Ensuite, il convient de transférer le fichier **.ssh/ |
< | < | ||
- | trainee@ansible:~$ scp .ssh/ | + | [trainee@centos8 |
Debian GNU/Linux 9 | Debian GNU/Linux 9 | ||
- | trainee@targeta.i2tch.loc's password: trainee | + | trainee@10.0.2.52's password: trainee |
- | authorized_keys | + | authorized_keys |
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important> |
**Important** : Notez que le mot de passe **trainee** ne sera pas en clair. | **Important** : Notez que le mot de passe **trainee** ne sera pas en clair. | ||
</ | </ | ||
- | Connectez-vous via ssh de la machine **Ansible** à la machine **TargetA** : | + | Connectez-vous via ssh de la machine **centos8** à la machine **targeta** : |
< | < | ||
- | trainee@ansible:~$ ssh -l trainee | + | [trainee@centos8 |
Debian GNU/Linux 9 | Debian GNU/Linux 9 | ||
Linux targeta.i2tch.loc 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 | Linux targeta.i2tch.loc 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 | ||
Ligne 331: | Ligne 350: | ||
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent | Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent | ||
permitted by applicable law. | permitted by applicable law. | ||
- | Last login: | + | Last login: |
+ | trainee@targeta: | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important> |
**Important** : Notez que l' | **Important** : Notez que l' | ||
</ | </ | ||
Ligne 345: | Ligne 365: | ||
< | < | ||
+ | trainee@targeta: | ||
+ | Mot de passe : fenestros | ||
root@targeta: | root@targeta: | ||
# | # | ||
Ligne 354: | Ligne 376: | ||
# See the man page for details on how to write a sudoers file. | # See the man page for details on how to write a sudoers file. | ||
# | # | ||
- | Defaults env_reset | + | Defaults |
- | Defaults mail_badpass | + | Defaults |
- | Defaults secure_path="/ | + | Defaults |
# Host alias specification | # Host alias specification | ||
Ligne 365: | Ligne 387: | ||
# User privilege specification | # User privilege specification | ||
- | root ALL=(ALL: | + | root ALL=(ALL: |
# Allow members of group sudo to execute any command | # Allow members of group sudo to execute any command | ||
- | %sudo ALL=(ALL: | + | %sudo |
# See sudoers(5) for more information on "# | # See sudoers(5) for more information on "# | ||
Ligne 375: | Ligne 397: | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important> |
**Important** : Notez la présence de la ligne **%sudo ALL=(ALL) ALL**. Cette ligne possède le format **Qui Où = (En tant que qui) Quoi**. La ligne implique donc que les membres du groupe **sudo** peuvent exécuter à partir de n' | **Important** : Notez la présence de la ligne **%sudo ALL=(ALL) ALL**. Cette ligne possède le format **Qui Où = (En tant que qui) Quoi**. La ligne implique donc que les membres du groupe **sudo** peuvent exécuter à partir de n' | ||
</ | </ | ||
- | Créez | + | Vérifez |
< | < | ||
- | root@targeta: | + | root@targeta: |
- | root@targeta: | + | trainee ALL=(ALL) |
- | trainee ALL=(ALL) | + | root@targeta: |
- | root@targeta: | + | -r--r----- 1 root root 31 janv. 29 2019 / |
- | root@targeta:~# mv ansible_users | + | |
- | root@targeta: | + | |
</ | </ | ||
Ligne 396: | Ligne 416: | ||
root@targeta: | root@targeta: | ||
déconnexion | déconnexion | ||
- | trainee@targeta: | + | trainee@targeta: |
+ | déconnexion | ||
+ | Connection to 10.0.2.52 closed. | ||
+ | [trainee@centos8 ~]$ | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important> |
**Important** : Notez que trainee a pu exécuter la commande **su -** via sudo sans saisir son mot de passe. | **Important** : Notez que trainee a pu exécuter la commande **su -** via sudo sans saisir son mot de passe. | ||
</ | </ | ||
----- | ----- | ||
- | + | Copyright © 2023 Hugh Norris. | |
- | Copyright © 2022 Hugh Norris. | + |