Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
elearning:workbooks:debian:10:junior:l114 [2022/04/29 07:57] – created adminelearning:workbooks:debian:10:junior:l114 [2024/03/08 08:41] (Version actuelle) admin
Ligne 1: Ligne 1:
 ~~PDF:LANDSCAPE~~ ~~PDF:LANDSCAPE~~
  
-Version : **2022.01**+Version : **2024.01**
  
 Dernière mise-à-jour : ~~LASTMOD~~ Dernière mise-à-jour : ~~LASTMOD~~
  
-======LDF208 - Gestion de la Journalisation======+======LDF508 - Gestion de la Journalisation======
  
 =====Contenu du Module===== =====Contenu du Module=====
  
-  * **LDF208 - Gestion de la Journalisation**+  * **LDF508 - Gestion de la Journalisation**
     * Contenu du Module     * Contenu du Module
     * Présentation     * Présentation
     * La Commande dmesg     * La Commande dmesg
-    * Surveillance Sécuritaire +    * LAB #1 - Surveillance Sécuritaire 
-      * La Commande last +      * 1.1 - La Commande last 
-      * La Commande lastlog +      * 1.2 - La Commande lastlog 
-      * La Commande lastb +      * 1.3 - La Commande lastb 
-      * Le fichier /var/log/auth.log +      * 1.4 - Le fichier /var/log/auth.log 
-    * Le fichier /var/log/audit/audit.log +      * 1.5 - Gestion des évènements audit 
-      * Gestion des événements audit+        * Le fichier /var/log/audit/audit.log
         * auditd         * auditd
         * auditctl         * auditctl
         * audispd         * audispd
-      * La consultation des événements audit +        * La consultation des événements audit 
-        * La Commande aureport +          * La Commande aureport 
-        * La Commande ausearch+          * La Commande ausearch
     * Le fichier /var/log/messages     * Le fichier /var/log/messages
     * Applications     * Applications
-    * rsyslog +    * LAB #2 - rsyslog 
-      * Priorités +      * 2.1 - Priorités 
-      * Sous-systèmes applicatifs +      * 2.2 - Sous-systèmes applicatifs 
-      * /etc/rsyslog.conf+      * 2.3 - /etc/rsyslog.conf
         * Modules         * Modules
         * Directives Globales         * Directives Globales
Ligne 41: Ligne 41:
           * n Sous-systèmes avec la même priorité           * n Sous-systèmes avec la même priorité
           * n Sélecteurs avec la même Action           * n Sélecteurs avec la même Action
-    * La Commande logger +    * LAB #3 - La Commande logger 
-    * La Commande logrotate +    * LAB #4 - La Commande logrotate 
-    * La Journalisation avec journald +    * LAB #5 - La Journalisation avec journald 
-      * Consultation des Journaux +      * 5.1 - Consultation des Journaux 
-        * Consultation des Journaux d'une Application Spécifique +      5.2 - Consultation des Journaux d'une Application Spécifique 
-        * Consultation des Journaux depuis le Dernier Démarrage +      5.3 - Consultation des Journaux depuis le Dernier Démarrage 
-        * Consultation des Journaux d'une Priorité Spécifique +      5.4 - Consultation des Journaux d'une Priorité Spécifique 
-        * Consultation des Journaux d'une Plage de Dates ou d'Heures +      5.5 - Consultation des Journaux d'une Plage de Dates ou d'Heures 
-        * Consultation des Journaux en Live +      5.6 - Consultation des Journaux en Live
-        * Consultation des Journaux avec des Mots Clefs+
  
 =====Présentation===== =====Présentation=====
Ligne 65: Ligne 64:
  
 <code> <code>
-root@debian8:~# dmesg | more +root@debian11:~# dmesg | more 
-[    0.000000] Initializing cgroup subsys cpuset +[    0.000000] Linux version 5.10.0-13-amd64 (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2 
-[    0.000000] Initializing cgroup subsys cpu +.35.2) #1 SMP Debian 5.10.106-1 (2022-03-17
-[    0.000000] Initializing cgroup subsys cpuacct +[    0.000000] Command lineBOOT_IMAGE=/boot/vmlinuz-5.10.0-13-amd64 root=UUID=9887a74f-a680-4bde-8f04-db5ae9ea186e ro quiet 
-[    0.000000] Linux version 3.16.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.8.(De +[    0.000000] x86/fpu: x87 FPU will use FXSAVE 
-bian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt11-1+deb8u5 (2015-10-09+[    0.000000] BIOS-provided physical RAM map:
-[    0.000000] e820: BIOS-provided physical RAM map:+
 [    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable [    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
 [    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved [    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
 [    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved [    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
-[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003ffeffff] usable +[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000bffd9fff] usable 
-[    0.000000] BIOS-e820: [mem 0x000000003fff0000-0x000000003fffffffACPI data+[    0.000000] BIOS-e820: [mem 0x00000000bffda000-0x00000000bfffffffreserved 
 +[    0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
 [    0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved [    0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
 +[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000013fffffff] usable
 [    0.000000] NX (Execute Disable) protection: active [    0.000000] NX (Execute Disable) protection: active
-[    0.000000] SMBIOS 2.present. +[    0.000000] SMBIOS 2.present. 
-[    0.000000] DMI: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 +[    0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 
-[    0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved +[    0.000000] Hypervisor detected: KVM 
-[    0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable +[    0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00 
-[    0.000000e820: last_pfn = 0x3fff0 max_arch_pfn = 0x1000000 +[    0.000000] kvm-clock: cpu 0, msr 5ccb8001, primary cpu clock 
-[    0.000000] MTRR default type: uncachable +[    0.000000] kvm-clock: using sched offset of 10164710878 cycles 
-[    0.000000] MTRR variable ranges disabled+[    0.000006] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns 
-[    0.000000] x86 PAT enabledcpu 0, old 0x7040600070406, new 0x7010600070106 +[    0.000013] tsc: Detected 2399.982 MHz processor 
-[    0.000000CPU MTRRs all blank - virtualized system+[    0.000754] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved 
-[    0.000000initial memory mapped: [mem 0x00000000-0x01bfffff]+[    0.000757] e820: remove [mem 0x000a0000-0x000fffff] usable 
 +[    0.000761] last_pfn = 0x140000 max_arch_pfn = 0x400000000 
 +[    0.000789] MTRR default type: write-back 
 +[    0.000791] MTRR fixed ranges enabled: 
 +[    0.000792]   00000-9FFFF write-back 
 +[    0.000793]   A0000-BFFFF uncachable 
 +[    0.000794]   C0000-FFFFF write-protect 
 +[    0.000795] MTRR variable ranges enabled
 +[    0.000796]   0 base 00C0000000 mask FFC0000000 uncachable 
 +[    0.000797]   1 disabled 
 +[    0.000797]   2 disabled 
 +[    0.000798]   3 disabled 
 +[    0.000798]   4 disabled 
 +[    0.000799]   5 disabled 
 +[    0.000799]   6 disabled 
 +[    0.000800]   7 disabled 
 +[    0.000815] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- UC   
 +[    0.000826last_pfn = 0xbffda max_arch_pfn = 0x400000000 
 +[    0.009867] found SMP MP-table at [mem 0x000f5a80-0x000f5a8f] 
 +[    0.010459RAMDISK: [mem 0x3304d000-0x3581dfff] 
 +[    0.010467] ACPI: Early table checksum verification disabled 
 +[    0.010479] ACPI: RSDP 0x00000000000F5880 000014 (v00 BOCHS ) 
 +[    0.010487] ACPI: RSDT 0x00000000BFFE145E 000038 (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001) 
 +[    0.010497] ACPI: FACP 0x00000000BFFE1240 000074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001)
 --More-- --More--
 +[q]
 </code> </code>
- 
-====Options de la Commande==== 
  
 Les option de cette commande sont : Les option de cette commande sont :
  
 <code> <code>
-root@debian8:~# dmesg --help+root@debian11:~# dmesg --help
  
 Usage: Usage:
  dmesg [options]  dmesg [options]
 +
 +Display or control the kernel ring buffer.
  
 Options: Options:
Ligne 112: Ligne 136:
  -k, --kernel                display kernel messages  -k, --kernel                display kernel messages
  -L, --color[=<when>       colorize messages (auto, always or never)  -L, --color[=<when>       colorize messages (auto, always or never)
 +                               colors are enabled by default
  -l, --level <list>          restrict output to defined levels  -l, --level <list>          restrict output to defined levels
  -n, --console-level <level> set level of messages printed to console  -n, --console-level <level> set level of messages printed to console
  -P, --nopager               do not pipe output into a pager  -P, --nopager               do not pipe output into a pager
 + -p, --force-prefix          force timestamp output on each line of multi-line messages
  -r, --raw                   print the raw message buffer  -r, --raw                   print the raw message buffer
 +     --noescape              don't escape unprintable character
  -S, --syslog                force to use syslog(2) rather than /dev/kmsg  -S, --syslog                force to use syslog(2) rather than /dev/kmsg
  -s, --buffer-size <size>    buffer size to query the kernel ring buffer  -s, --buffer-size <size>    buffer size to query the kernel ring buffer
  -u, --userspace             display userspace messages  -u, --userspace             display userspace messages
  -w, --follow                wait for new messages  -w, --follow                wait for new messages
 + -W, --follow-new            wait and print only new messages
  -x, --decode                decode facility and level to readable string  -x, --decode                decode facility and level to readable string
  -d, --show-delta            show time delta between printed messages  -d, --show-delta            show time delta between printed messages
  -e, --reltime               show local time and time delta in readable format  -e, --reltime               show local time and time delta in readable format
- -T, --ctime                 show human readable timestamp + -T, --ctime                 show human-readable timestamp (may be inaccurate!) 
- -t, --notime                don'print messages timestamp + -t, --notime                don'show any timestamp with messages 
-     --time-format <format>  show time stamp using format:+     --time-format <format>  show timestamp using the given format:
                                [delta|reltime|ctime|notime|iso]                                [delta|reltime|ctime|notime|iso]
 Suspending/resume will make ctime and iso timestamps inaccurate. Suspending/resume will make ctime and iso timestamps inaccurate.
  
- -h, --help     display this help and exit + -h, --help                  display this help 
- -V, --version  output version information and exit+ -V, --version               display version
  
 Supported log facilities: Supported log facilities:
Ligne 151: Ligne 179:
     info - informational     info - informational
    debug - debug-level messages    debug - debug-level messages
- 
  
 For more details see dmesg(1). For more details see dmesg(1).
 </code> </code>
  
-=====Surveillance Sécuritaire=====+=====LAB #1 - Surveillance Sécuritaire=====
  
-====La Commande last====+====1.1 - La Commande last====
  
 Cette commande indique les dates et heures des connexions des utilisateurs à partir du contenu du fichier **/var/log/wtmp** : Cette commande indique les dates et heures des connexions des utilisateurs à partir du contenu du fichier **/var/log/wtmp** :
  
 <code> <code>
-root@debian8:~# last +root@debian11:~# last 
-trainee  pts/0        :              Mon Oct 26 14:21   still logged in    +trainee  pts/0        10.0.2.1         Fri Apr 29 14:17   still logged in 
-trainee  pts/0        :              Mon Oct 26 14:15 14:19  (00:04    +trainee  pts/0        10.0.2.1         Thu Apr 28 05:24 16:47  (11:22
-trainee  :          :              Mon Oct 26 13:52   still logged in    +trainee  pts/       10.0.2.1         Wed Apr 27 10:38 17:09  (06:31
-reboot   system boot  3.16.0-4-686-pae Mon Oct 26 13:51 14:28 (2+00:36   +trainee  pts/0        10.0.2.1         Tue Apr 26 13:24 19:44  (06:20
-trainee  pts/0        :              Mon Oct 26 13:10 crash  (00:40)     +reboot   system boot  5.10.0-13-amd64  Tue Apr 26 13:08   still running 
-trainee  :0           :              Mon Oct 26 11:22 - crash  (02:28    +trainee  pts/0        10.0.2.1         Mon Apr 25 13:36 17:18  (03:41
-reboot   system boot  3.16.0-4-686-pae Mon Oct 26 11:22 - 14:28 (2+03:05)    +reboot   system boot  5.10.0-13-amd64  Mon Apr 25 07:08   still running 
-trainee  pts/0        :              Fri Oct 23 17:00 crash (2+19:21)    +trainee  pts/       10.0.2.1         Mon Apr 25 07:05 07:05  (00:00
-trainee  :0           :              Fri Oct 23 17:00 - crash (2+19:21   +trainee  tty7         :0               Mon Apr 25 07:03 crash  (00:05
-reboot   system boot  3.16.0-4-686-pae Fri Oct 23 16:59 - 14:28 (4+22:28)    +reboot   system boot  5.10.0-13-amd64  Mon Apr 25 07:01   still running
-trainee  pts/       :              Fri Oct 23 16:51 16:59  (00:08    +
-trainee  :0           :0               Fri Oct 23 16:50 16:59  (00:09    +
-reboot   system boot  3.16.0-4-686-pae Fri Oct 23 16:50 - 16:59  (00:09)     +
-reboot   system boot  3.16.0-4-686-pae Fri Oct 23 16:47 - 16:59  (00:12)    +
  
-wtmp begins Fri Oct 23 16:47:17 2015+wtmp begins Mon Apr 25 07:01:57 2022
 </code> </code>
  
-===Options de la Commande=== 
  
 Les option de cette commande sont : Les option de cette commande sont :
  
 <code> <code>
-root@debian8:~# last --help +root@debian11:~# last --help 
-last: invalid option -- '-' + 
-Usage: last [-num | -n num] [-f file] [-t YYYYMMDDHHMMSS] [-R] [-adioxFw] [username..] [tty..]+Usage: 
 + last [options] [<username>...] [<tty>...] 
 + 
 +Show a listing of last logged in users. 
 + 
 +Options: 
 + -<number>            how many lines to show 
 + -a, --hostlast       display hostnames in the last column 
 + -d, --dns            translate the IP number back into a hostname 
 + -f, --file <file>    use a specific file instead of /var/log/wtmp 
 + -F, --fulltimes      print full login and logout times and dates 
 + -i, --ip             display IP numbers in numbers-and-dots notation 
 + -n, --limit <number> how many lines to show 
 + -R, --nohostname     don't display the hostname field 
 + -s, --since <time>   display the lines since the specified time 
 + -t, --until <time>   display the lines until the specified time 
 + -p, --present <time> display who were present at the specified time 
 + -w, --fullnames      display full user and domain names 
 + -x, --system         display system shutdown entries and run level changes 
 +     --time-format <format>  show timestamps in the specified <format>: 
 +                               notime|short|full|iso 
 + 
 + -h, --help           display this help 
 + -V, --version        display version 
 + 
 +For more details see last(1).
 </code> </code>
  
-====La Commande lastlog====+====1.2 - La Commande lastlog====
  
 Cette commande indique les dates et heures de la connexion au système la plus récente des utilisateurs : Cette commande indique les dates et heures de la connexion au système la plus récente des utilisateurs :
  
 <code> <code>
-root@debian8:~# lastlog+root@debian11:~# lastlog
 Username         Port     From             Latest Username         Port     From             Latest
 root                                       **Never logged in** root                                       **Never logged in**
Ligne 217: Ligne 264:
 gnats                                      **Never logged in** gnats                                      **Never logged in**
 nobody                                     **Never logged in** nobody                                     **Never logged in**
-systemd-timesync                           **Never logged in**+_apt                                       **Never logged in**
 systemd-network                            **Never logged in** systemd-network                            **Never logged in**
 systemd-resolve                            **Never logged in** systemd-resolve                            **Never logged in**
-systemd-bus-proxy                           **Never logged in** 
 messagebus                                 **Never logged in** messagebus                                 **Never logged in**
-pulse                                      **Never logged in** +systemd-timesync                           **Never logged in** 
-avahi                                      **Never logged in** +usbmux                                     **Never logged in** 
-uuidd                                      **Never logged in** +rtkit                                      **Never logged in**
-Debian-exim                                **Never logged in** +
-statd                                      **Never logged in** +
-avahi-autoipd                              **Never logged in** +
-colord                                     **Never logged in**+
 dnsmasq                                    **Never logged in** dnsmasq                                    **Never logged in**
-geoclue                                    **Never logged in**+avahi                                      **Never logged in**
 speech-dispatcher                           **Never logged in** speech-dispatcher                           **Never logged in**
-sshd                                       **Never logged in** +pulse                                      **Never logged in**
-rtkit                                      **Never logged in**+
 saned                                      **Never logged in** saned                                      **Never logged in**
-usbmux                                     **Never logged in** +colord                                     **Never logged in**
-hplip                                      **Never logged in**+
 lightdm                                    **Never logged in** lightdm                                    **Never logged in**
-trainee                                    **Never logged in** +trainee          pts/   10.0.2.1         Fri Apr 29 14:17:31 +0200 2022 
-vboxadd                                    **Never logged in**+systemd-coredump                           **Never logged in** 
 +sshd                                       **Never logged in**
 </code> </code>
- 
-===Options de la Commande=== 
  
 Les option de cette commande sont : Les option de cette commande sont :
  
 <code> <code>
-root@debian8:~# lastlog --help+root@debian11:~# lastlog --help
 Usage: lastlog [options] Usage: lastlog [options]
  
 Options: Options:
   -b, --before DAYS             print only lastlog records older than DAYS   -b, --before DAYS             print only lastlog records older than DAYS
 +  -C, --clear                   clear lastlog record of an user (usable only with -u)
   -h, --help                    display this help message and exit   -h, --help                    display this help message and exit
   -R, --root CHROOT_DIR         directory to chroot into   -R, --root CHROOT_DIR         directory to chroot into
 +  -S, --set                     set lastlog record to current time (usable only with -u)
   -t, --time DAYS               print only lastlog records more recent than DAYS   -t, --time DAYS               print only lastlog records more recent than DAYS
   -u, --user LOGIN              print lastlog record of the specified LOGIN   -u, --user LOGIN              print lastlog record of the specified LOGIN
 </code> </code>
  
-====La Commande lastb====+====1.3 - La Commande lastb====
  
 Cette commande indique les dates et heures des connexions infructueueses des utilisateurs à partir du contenu du fichier **/var/log/btmp** : Cette commande indique les dates et heures des connexions infructueueses des utilisateurs à partir du contenu du fichier **/var/log/btmp** :
  
 <code> <code>
-root@debian8:~# lastb +root@debian11:~# lastb 
-trainee  :0           :0               Wed Oct 28 15:01 15:01  (00:00)     +trainee  ssh:notty    10.0.2.1         Fri Apr 29 14:22 14:22  (00:00) 
-trainee  :0           :0               Wed Oct 28 15:01 15:01  (00:00)     +trainee  ssh:notty    10.0.2.1         Fri Apr 29 14:22 14:22  (00:00) 
-trainee  :0           :0               Wed Oct 28 15:01 15:01  (00:00)     +trainee  ssh:notty    10.0.2.1         Fri Apr 29 14:22 14:22  (00:00) 
-trainee  :0           :0               Wed Oct 28 15:01 15:01  (00:00)     +trainee  ssh:notty    10.0.2.1         Fri Apr 29 14:22 14:22  (00:00) 
-trainee  :0           :0               Wed Oct 28 15:01 15:01  (00:00)     +trainee  ssh:notty    10.0.2.1         Fri Apr 29 14:22 14:22  (00:00) 
-trainee  :0           :              Wed Oct 28 15:01 - 15:01  (00:00)     +trainee  ssh:notty    10.0.2.1         Fri Apr 29 14:22 14:22  (00:00)
-trainee  :          :0               Wed Oct 28 15:01 15:01  (00:00)    +
  
-btmp begins Wed Oct 28 15:01:05 2015+btmp begins Fri Apr 29 14:22:11 2022
 </code> </code>
- 
-===Options de la Commande=== 
  
 Les options de cette commande sont : Les options de cette commande sont :
  
 <code> <code>
-root@debian8:~# lastb --help +root@debian11:~# lastb --help 
-lastb: invalid option -- '-' + 
-Usage: lastb [-num | -n num] [-f file] [-t YYYYMMDDHHMMSS] [-R] [-adioxFw] [username..] [tty..]+Usage: 
 + lastb [options] [<username>...] [<tty>...] 
 + 
 +Show a listing of last logged in users. 
 + 
 +Options: 
 + -<number>            how many lines to show 
 + -a, --hostlast       display hostnames in the last column 
 + -d, --dns            translate the IP number back into a hostname 
 + -f, --file <file>    use a specific file instead of /var/log/btmp 
 + -F, --fulltimes      print full login and logout times and dates 
 + -i, --ip             display IP numbers in numbers-and-dots notation 
 + -n, --limit <number> how many lines to show 
 + -R, --nohostname     don't display the hostname field 
 + -s, --since <time>   display the lines since the specified time 
 + -t, --until <time>   display the lines until the specified time 
 + -p, --present <time> display who were present at the specified time 
 + -w, --fullnames      display full user and domain names 
 + -x, --system         display system shutdown entries and run level changes 
 +     --time-format <format>  show timestamps in the specified <format>: 
 +                               notime|short|full|iso 
 + 
 + -h, --help           display this help 
 + -V, --version        display version 
 + 
 +For more details see last(1).
 </code> </code>
  
-====Le fichier /var/log/auth.log====+====1.4 - Le fichier /var/log/auth.log====
  
 Sous Debian, ces mêmes informations se trouvent dans le fichier **/var/log/auth.log** : Sous Debian, ces mêmes informations se trouvent dans le fichier **/var/log/auth.log** :
  
 <code> <code>
-root@debian8:~# tail -n 15 /var/log/auth.log +root@debian11:~# tail -n 15 /var/log/auth.log 
-Oct 28 14:29:01 debian8 CRON[4497]: pam_unix(cron:session): session closed for user trainee +Apr 29 14:22:22 debian11 sshd[45387]: Failed password for trainee from 10.0.2.1 port 55278 ssh2 
-Oct 28 14:30:01 debian8 CRON[4504]: pam_unix(cron:session): session opened for user trainee by (uid=0) +Apr 29 14:22:23 debian11 sshd[45387]: Connection closed by authenticating user trainee 10.0.2.1 port 55278 [preauth] 
-Oct 28 14:30:01 debian8 CRON[4504]: pam_unix(cron:session): session closed for user trainee +Apr 29 14:22:23 debian11 sshd[45387]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.0.2.1  user=trainee 
-Oct 28 14:31:01 debian8 CRON[4508]: pam_unix(cron:session): session opened for user trainee by (uid=0+Apr 29 14:22:29 debian11 sshd[45391]: pam_unix(sshd:auth): authentication failure; logname= uid=euid=0 tty=ssh ruser= rhost=10.0.2.1  user=trainee 
-Oct 28 14:31:01 debian8 CRON[4508]: pam_unix(cron:session): session closed for user trainee +Apr 29 14:22:31 debian11 sshd[45391]: Failed password for trainee from 10.0.2.1 port 55296 ssh2 
-Oct 28 14:31:30 debian8 su[1558]: pam_unix(su:session): session closed for user root +Apr 29 14:22:35 debian11 sshd[45391]: Failed password for trainee from 10.0.2.1 port 55296 ssh2 
-Oct 28 14:31:36 debian8 su[4513]: pam_unix(su:auth): authentication failure; logname=trainee uid=1000 euid=0 tty=/dev/pts/ruser=trainee rhost=  user=root +Apr 29 14:22:40 debian11 sshd[45391]: Failed password for trainee from 10.0.2.1 port 55296 ssh2 
-Oct 28 14:31:38 debian8 su[4513]: pam_authenticate: Authentication failure +Apr 29 14:22:41 debian11 sshd[45391]: Connection closed by authenticating user trainee 10.0.2.1 port 55296 [preauth] 
-Oct 28 14:31:38 debian8 su[4513]: FAILED su for root by trainee +Apr 29 14:22:41 debian11 sshd[45391]: PAM 2 more authentication failures; logname= uid=euid=0 tty=ssh ruser= rhost=10.0.2.1  user=trainee 
-Oct 28 14:31:38 debian8 su[4513]: - /dev/pts/trainee:root +Apr 29 14:22:46 debian11 sshd[45393]: Accepted password for trainee from 10.0.2.1 port 55306 ssh2 
-Oct 28 14:31:46 debian8 su[4514]: Successful su for root by trainee +Apr 29 14:22:46 debian11 sshd[45393]: pam_unix(sshd:session): session opened for user trainee(uid=1000) by (uid=0
-Oct 28 14:31:46 debian8 su[4514]: + /dev/pts/0 trainee:root +Apr 29 14:22:46 debian11 systemd-logind[385]: New session 142 of user trainee. 
-Oct 28 14:31:46 debian8 su[4514]: pam_unix(su:session): session opened for user root by trainee(uid=1000) +Apr 29 14:22:46 debian11 systemd: pam_unix(systemd-user:session): session opened for user trainee(uid=1000) by (uid=0) 
-Oct 28 14:32:01 debian8 CRON[4522]: pam_unix(cron:session): session opened for user trainee by (uid=0) +Apr 29 14:22:52 debian11 su: (to root) trainee on pts/0 
-Oct 28 14:32:01 debian8 CRON[4522]: pam_unix(cron:session): session closed for user trainee+Apr 29 14:22:52 debian11 su: pam_unix(su-l:session): session opened for user root(uid=0) by trainee(uid=1000)
 </code> </code>
  
-=====Le fichier /var/log/audit/audit.log=====+====1.5 - Gestion des Evénements audit====
  
-Ce fichier contient les messages du système d'audit, appelés des **évènements**. Le système audit est installé par défaut dans RHEL/CentOS par le paquet **audit**. Le système audit collectionne des informations telles :+===Le fichier /var/log/audit/audit.log=== 
 + 
 +Ce fichier contient les messages du système d'audit, appelés des **événements**. Le système audit collectionne des informations telles :
  
   * des appels système,   * des appels système,
Ligne 319: Ligne 384:
  
 <code> <code>
-root@debian8:~# apt-get install auditd +root@debian11:~# apt-get -y install auditd
-Reading package lists... Done +
-Building dependency tree        +
-Reading state information... Done +
-The following extra packages will be installed: +
-  libauparse0 +
-Suggested packages: +
-  audispd-plugins +
-The following NEW packages will be installed: +
-  auditd libauparse0 +
-0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +
-Need to get 262 kB of archives. +
-After this operation, 712 kB of additional disk space will be used. +
-Do you want to continue? [Y/n] y +
-Get:1 http://ftp.fr.debian.org/debian/ jessie/main libauparse0 i386 1:2.4-1+b1 [48.7 kB] +
-Get:2 http://ftp.fr.debian.org/debian/ jessie/main auditd i386 1:2.4-1+b1 [213 kB] +
-Fetched 262 kB in 1s (168 kB/s)   +
-Selecting previously unselected package libauparse0:i386. +
-(Reading database ... 167450 files and directories currently installed.) +
-Preparing to unpack .../libauparse0_1%3a2.4-1+b1_i386.deb ... +
-Unpacking libauparse0:i386 (1:2.4-1+b1) ... +
-Selecting previously unselected package auditd. +
-Preparing to unpack .../auditd_1%3a2.4-1+b1_i386.deb ... +
-Unpacking auditd (1:2.4-1+b1) ... +
-Processing triggers for man-db (2.7.0.2-5) ... +
-Processing triggers for systemd (215-17+deb8u2) ... +
-Setting up libauparse0:i386 (1:2.4-1+b1) ... +
-Setting up auditd (1:2.4-1+b1) ... +
-update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults +
-Processing triggers for libc-bin (2.19-18+deb8u1) ... +
-Processing triggers for systemd (215-17+deb8u2) ...+
 </code> </code>
  
Ligne 355: Ligne 390:
  
 <code> <code>
-root@debian8:~# tail -n 15 /var/log/audit/audit.log +root@debian11:~# tail -n 15 /var/log/audit/audit.log 
-type=USER_START msg=audit(1446039481.860:899): pid=4559 uid=0 auid=1000 ses=443 msg='op=PAM:session_open acct="trainee" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' +type=DAEMON_START msg=audit(1651235065.372:1869): op=start ver=3.0 format=enriched kernel=5.10.0-13-amd64 auid=4294967295 pid=45572 uid=0 ses=4294967295 subj=unconfined  res=successAUID="unsetUID="root
-type=CRED_DISP msg=audit(1446039481.864:900): pid=4559 uid=auid=1000 ses=443 msg='op=PAM:setcred acct="trainee" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' +type=CONFIG_CHANGE msg=audit(1651235065.384:26): op=set audit_backlog_limit=8192 old=64 auid=4294967295 ses=4294967295 subj==unconfined res=1AUID="unset
-type=USER_END msg=audit(1446039481.864:901): pid=4559 uid=0 auid=1000 ses=443 msg='op=PAM:session_close acct="trainee" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' +type=CONFIG_CHANGE msg=audit(1651235065.384:27): op=set audit_failure=1 old=auid=4294967295 ses=4294967295 subj==unconfined res=1AUID="unset
-type=USER_ACCT msg=audit(1446039541.874:902): pid=4567 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting acct="trainee" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' +type=CONFIG_CHANGE msg=audit(1651235065.384:28): op=set audit_backlog_wait_time=60000 old=15000 auid=4294967295 ses=4294967295 subj==unconfined res=1AUID="unset
-type=CRED_ACQ msg=audit(1446039541.874:903): pid=4567 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred acct="traineeexe="/usr/sbin/cronhostname=? addr=? terminal=cron res=success' +type=SERVICE_START msg=audit(1651235065.388:29): pid=uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=auditd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'UID="rootAUID="unset"
-type=LOGIN msg=audit(1446039541.874:904): pid=4567 uid=old-auid=4294967295 auid=1000 old-ses=4294967295 ses=444 res=+
-type=USER_START msg=audit(1446039541.874:905): pid=4567 uid=0 auid=1000 ses=444 msg='op=PAM:session_open acct="trainee" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' +
-type=CRED_DISP msg=audit(1446039541.878:906): pid=4567 uid=0 auid=1000 ses=444 msg='op=PAM:setcred acct="traineeexe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' +
-type=USER_END msg=audit(1446039541.878:907): pid=4567 uid=0 auid=1000 ses=444 msg='op=PAM:session_close acct="trainee" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' +
-type=USER_ACCT msg=audit(1446039601.888:908): pid=4571 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting acct="trainee" exe="/usr/sbin/cronhostname=? addr=? terminal=cron res=success' +
-type=CRED_ACQ msg=audit(1446039601.888:909): pid=4571 uid=auid=4294967295 ses=4294967295 msg='op=PAM:setcred acct="trainee" exe="/usr/sbin/cronhostname=? addr=? terminal=cron res=success' +
-type=LOGIN msg=audit(1446039601.888:910): pid=4571 uid=0 old-auid=4294967295 auid=1000 old-ses=4294967295 ses=445 res=+
-type=USER_START msg=audit(1446039601.888:911): pid=4571 uid=0 auid=1000 ses=445 msg='op=PAM:session_open acct="trainee" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' +
-type=CRED_DISP msg=audit(1446039601.896:912): pid=4571 uid=0 auid=1000 ses=445 msg='op=PAM:setcred acct="trainee" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' +
-type=USER_END msg=audit(1446039601.896:913): pid=4571 uid=0 auid=1000 ses=445 msg='op=PAM:session_close acct="traineeexe="/usr/sbin/cronhostname=? addr=? terminal=cron res=success'+
 </code> </code>
- 
-====Gestion des évènements audit==== 
  
 La gestion des évènements audit se repose sur trois exécutables : La gestion des évènements audit se repose sur trois exécutables :
Ligne 382: Ligne 405:
  
 <code> <code>
-root@debian8:~# cat /etc/audit/auditd.conf+root@debian11:~# cat /etc/audit/auditd.conf
 # #
 # This file controls the configuration of the audit daemon # This file controls the configuration of the audit daemon
 # #
  
 +local_events = yes
 +write_logs = yes
 log_file = /var/log/audit/audit.log log_file = /var/log/audit/audit.log
-log_format = RAW +log_group = adm 
-log_group = root +log_format ENRICHED 
-priority_boost 4 +flush = INCREMENTAL_ASYNC 
-flush = INCREMENTAL +freq = 50 
-freq = 20+max_log_file = 8
 num_logs = 5 num_logs = 5
-disp_qos lossy +priority_boost 4
-dispatcher = /sbin/audispd+
 name_format = NONE name_format = NONE
 ##name = mydomain ##name = mydomain
-max_log_file = 6  
 max_log_file_action = ROTATE max_log_file_action = ROTATE
 space_left = 75 space_left = 75
 space_left_action = SYSLOG space_left_action = SYSLOG
 +verify_email = yes
 action_mail_acct = root action_mail_acct = root
 admin_space_left = 50 admin_space_left = 50
Ligne 407: Ligne 431:
 disk_full_action = SUSPEND disk_full_action = SUSPEND
 disk_error_action = SUSPEND disk_error_action = SUSPEND
-##tcp_listen_port = +use_libwrap = yes 
 +##tcp_listen_port = 60
 tcp_listen_queue = 5 tcp_listen_queue = 5
 tcp_max_per_addr = 1 tcp_max_per_addr = 1
 ##tcp_client_ports = 1024-65535 ##tcp_client_ports = 1024-65535
 tcp_client_max_idle = 0 tcp_client_max_idle = 0
-enable_krb5 no+transport TCP
 krb5_principal = auditd krb5_principal = auditd
 ##krb5_key_file = /etc/audit/audit.key ##krb5_key_file = /etc/audit/audit.key
 +distribute_network = no
 +q_depth = 400
 +overflow_action = SYSLOG
 +max_restarts = 10
 +plugin_dir = /etc/audit/plugins.d
 </code> </code>
- 
-==Options de la Commande== 
  
 Les option de cette commande sont : Les option de cette commande sont :
  
 <code> <code>
-root@debian8:~# auditd --help +root@debian11:~# auditd --help 
-auditd: invalid option -- '-+auditd: unrecognized option '--help
-Usage: auditd [-f] [-l] [-n] [-s disable|enable|nochange]+Usage: auditd [-f] [-l] [-n] [-s disable|enable|nochange] [-c <config_file>]
 </code> </code>
  
 ===auditctl=== ===auditctl===
  
-Cet exécutable est utilisé pour configurer les règles du système audit. Au démarrage, auditctl lit et applique les règles contunues dans le fichier **/etc/audit/audit.rules** :+Cet exécutable est utilisé pour configurer les règles du système audit. Au démarrage, auditctl lit et applique les règles contenues dans le fichier **/etc/audit/audit.rules** :
  
 <code> <code>
-root@debian8:~# cat /etc/audit/audit.rules +root@debian11:~# cat /etc/audit/audit.rules 
-# This file contains the auditctl rules that are loaded +## This file is automatically generated from /etc/audit/rules.d
-# whenever the audit daemon is started via the initscripts. +
-# The rules are simply the parameters that would be passed +
-# to auditctl. +
- +
-# First rule - delete all+
 -D -D
- +-b 8192 
-# Increase the buffers to survive stress events. +-f 1 
-# Make this bigger for busy systems +--backlog_wait_time 60000
--b 320 +
- +
-# Feel free to add below this line. See auditctl man pag+
 </code> </code>
- 
-==Options de la Commande== 
  
 Les options de cette commande sont : Les options de cette commande sont :
  
 <code> <code>
-root@debian8:~# auditctl --help+root@debian11:~# auditctl -h
 usage: auditctl [options] usage: auditctl [options]
-    -a <l,a>            Append rule to end of <l>ist with <a>ction +    -a <l,a>                          Append rule to end of <l>ist with <a>ction 
-    -A <l,a>            Add rule at beginning of <l>ist with <a>ction +    -A <l,a>                          Add rule at beginning of <l>ist with <a>ction 
-    -b <backlog>        Set max number of outstanding audit buffers +    -b <backlog>                      Set max number of outstanding audit buffers 
-                        allowed Default=64 +                                      allowed Default=64 
-    -c                  Continue through errors in rules +    -c                                Continue through errors in rules 
-    -C f=f              Compare collected fields if available: +    -C f=f                            Compare collected fields if available: 
-                        Field name, operator(=,!=), field name +                                      Field name, operator(=,!=), field name 
-    -d <l,a>            Delete rule from <l>ist with <a>ction +    -d <l,a>                          Delete rule from <l>ist with <a>ction 
-                        l=task,exit,user,exclude +                                      l=task,exit,user,exclude 
-                        a=never,always +                                      a=never,always 
-    -D                  Delete all rules and watches +    -D                                Delete all rules and watches 
-    -e [0..2]           Set enabled flag +    -e [0..2]                         Set enabled flag 
-    -f [0..2]           Set failure flag +    -f [0..2]                         Set failure flag 
-                        0=silent 1=printk 2=panic +                                      0=silent 1=printk 2=panic 
-    -F f=v              Build rule: field name, operator(=,!=,<,>,<=, +    -F f=v                            Build rule: field name, operator(=,!=,<,>,<=, 
-                        >=,&,&=) value +                                      >=,&,&=) value 
-    -h                  Help +    -h                                Help 
-    -i                  Ignore errors when reading rules from file +    -i                                Ignore errors when reading rules from file 
-    -k <key>            Set filter key on audit rule +    -k <key>                          Set filter key on audit rule 
-    -l                  List rules +    -l                                List rules 
-    -m text             Send a user-space message +    -m text                           Send a user-space message 
-    -p [r|w|x|a]        Set permissions filter on watch +    -p [r|w|x|a]                      Set permissions filter on watch 
-                        r=read, w=write, x=execute, a=attribute +                                      r=read, w=write, x=execute, a=attribute 
-    -q <mount,subtree>  make subtree part of mount point's dir watches +    -q <mount,subtree>                make subtree part of mount point's dir watches 
-    -r <rate>           Set limit in messages/sec (0=none) +    -r <rate>                         Set limit in messages/sec (0=none) 
-    -R <file>           read rules from file +    -R <file>                         read rules from file 
-    -s                  Report status +    -s                                Report status 
-    -S syscall          Build rule: syscall name or number +    -S syscall                        Build rule: syscall name or number 
-    -t                  Trim directory watches +    --signal <signal>                 Send the specified signal to the daemon    -t                                Trim directory watches 
-    -v                  Version +    -v                                Version 
-    -w <path>           Insert watch at <path> +    -w <path>                         Insert watch at <path> 
-    -W <path>           Remove watch at <path> +    -W <path>                         Remove watch at <path> 
-    --loginuid-immutable   Make loginuids unchangeable once set+    --loginuid-immutable              Make loginuids unchangeable once set 
 +    --backlog_wait_time               Set the kernel backlog_wait_time 
 +    --reset-lost                      Reset the lost record counter 
 +    --reset_backlog_wait_time_actual  Reset the actual backlog wait time counter
 </code> </code>
      
 ===audispd=== ===audispd===
  
-Cet exécutable est responsable de la distribution des évènements audit à des applications tierces. Le démarrage et l'arrêt de cet exécutable est contrôlé par **auditd**. Afin d'informer **audispd** de la façon dont elles veulent recevoir les informations concernant les évènements, les applications placent un fichier de configuration dans le répertoire **/etc/audisp/plugins.d** :+Cet exécutable est responsable de la distribution des événements audit à des applications tierces. Le démarrage et l'arrêt de cet exécutable est contrôlé par **auditd**. Afin d'informer **audispd** de la façon dont elles veulent recevoir les informations concernant les événements, les applications placent un fichier de configuration dans le répertoire **/etc/audit/plugins.d** :
  
 <code> <code>
-root@debian8:~# ls /etc/audisp/plugins.d+root@debian11:~# ls /etc/audit/plugins.d
 af_unix.conf  syslog.conf af_unix.conf  syslog.conf
 </code> </code>
Ligne 502: Ligne 523:
  
 <code> <code>
-root@debian8:~# cat /etc/audisp/plugins.d/syslog.conf+root@debian11:~# cat /etc/audit/plugins.d/syslog.conf
 # This file controls the configuration of the syslog plugin. # This file controls the configuration of the syslog plugin.
 # It simply takes events and writes them to syslog. The # It simply takes events and writes them to syslog. The
Ligne 508: Ligne 529:
 # want the events written with. And optionally, you can give # want the events written with. And optionally, you can give
 # a second argument indicating the facility that you want events # a second argument indicating the facility that you want events
-# logged to. Valid options are LOG_LOCAL0 through 7.+# logged to. Valid options are LOG_LOCAL0 through 7, LOG_AUTH, 
 +# LOG_AUTHPRIV, LOG_DAEMON, LOG_SYSLOG, and LOG_USER.
  
 active = no active = no
 direction = out direction = out
-path = builtin_syslog +path = /sbin/audisp-syslog 
-type = builtin +type = always 
 args = LOG_INFO args = LOG_INFO
 format = string format = string
 </code> </code>
  
-====La consultation des évènements audit====+===La consultation des événements audit===
  
-La consultation des évènements audit se fait en utilisant les commandes **ausearch** et **aureport** :+La consultation des événements audit se fait en utilisant les commandes **ausearch** et **aureport** :
  
-===La Commande aureport===+==La Commande aureport==
  
 Cette commande est utilisée pour générer des rapports : Cette commande est utilisée pour générer des rapports :
  
 <code> <code>
-root@debian8:~# aureport+root@debian11:~# aureport
  
 Summary Report Summary Report
 ====================== ======================
-Range of time in logs: 10/28/2015 06:37:21.563 10/28/2015 14:48:01.088 +Range of time in logs: 04/29/2022 14:24:25.372 04/29/2022 14:24:25.388 
-Selected time for report: 10/28/2015 06:37:21 10/28/2015 14:48:01.088 +Selected time for report: 04/29/2022 14:24:25 04/29/2022 14:24:25.388 
-Number of changes in configuration: 0+Number of changes in configuration: 3
 Number of changes to accounts, groups, or roles: 0 Number of changes to accounts, groups, or roles: 0
 Number of logins: 0 Number of logins: 0
 Number of failed logins: 0 Number of failed logins: 0
-Number of authentications: 1 +Number of authentications: 0 
-Number of failed authentications: 1 +Number of failed authentications: 0 
-Number of users: 3 +Number of users: 1 
-Number of terminals: 3+Number of terminals: 1
 Number of host names: 1 Number of host names: 1
-Number of executables: 3+Number of executables: 
 +Number of commands: 1
 Number of files: 0 Number of files: 0
 Number of AVC's: 0 Number of AVC's: 0
Ligne 550: Ligne 573:
 Number of responses to anomaly events: 0 Number of responses to anomaly events: 0
 Number of crypto events: 0 Number of crypto events: 0
 +Number of integrity events: 0
 +Number of virt events: 0
 Number of keys: 0 Number of keys: 0
-Number of process IDs: 163 +Number of process IDs: 2 
-Number of events: 959+Number of events: 5
 </code> </code>
  
Ligne 558: Ligne 583:
  
 <code> <code>
-root@debian8:~# aureport --help+root@debian11:~# aureport --help
 usage: aureport [options] usage: aureport [options]
- -a,--avc Avc report +        -a,--avc                        Avc report 
- -au,--auth Authentication report +        -au,--auth                      Authentication report 
- -c,--config Config change report +        --comm                          Commands run report 
- -cr,--crypto Crypto report +        -c,--config                     Config change report 
- -e,--event Event report +        -cr,--crypto                    Crypto report 
- -f,--file File name report +        -e,--event                      Event report 
- --failed only failed events in report +        -f,--file                       File name report 
- -h,--host Remote Host name report +        --failed                        only failed events in report 
- --help help +        -h,--host                       Remote Host name report 
- -i,--interpret Interpretive mode +        --help                          help 
- -if,--input <Input File name> use this file as input +        -i,--interpret                  Interpretive mode 
- --input-logs Use the logs even if stdin is a pipe +        -if,--input <Input File name>   use this file as input 
- -l,--login Login report +        --input-logs                    Use the logs even if stdin is a pipe 
- -k,--key Key report +        --integrity                     Integrity event report 
- -m,--mods Modification to accounts report +        -l,--login                      Login report 
- -ma,--mac Mandatory Access Control (MAC) report +        -k,--key                        Key report 
- -n,--anomaly aNomaly report +        -m,--mods                       Modification to accounts report 
- -nc,--no-config Don't include config events +        -ma,--mac                       Mandatory Access Control (MAC) report 
- --node <node name> Only events from a specific node +        -n,--anomaly                    aNomaly report 
- -p,--pid Pid report +        -nc,--no-config                 Don't include config events 
- -r,--response Response to anomaly report +        --node <node name>              Only events from a specific node 
- -s,--syscall Syscall report +        -p,--pid                        Pid report 
- --success only success events in report +        -r,--response                   Response to anomaly report 
- --summary sorted totals for main object in report +        -s,--syscall                    Syscall report 
- -t,--log Log time range report +        --success                       only success events in report 
- -te,--end [end date] [end time] ending date & time for reports +        --summary                       sorted totals for main object in report 
- -tm,--terminal TerMinal name report +        -t,--log                        Log time range report 
- -ts,--start [start date] [start time] starting data & time for reports +        -te,--end [end date] [end time] ending date & time for reports 
- --tty Report about tty keystrokes +        -tm,--terminal                  TerMinal name report 
- -u,--user User name report +        -ts,--start [start date] [start time]   starting data & time for reports 
- -v,--version Version +        --tty                           Report about tty keystrokes 
- -x,--executable eXecutable name report +        -u,--user                       User name report 
- If no report is given, the summary report will be displayed+        -v,--version                    Version 
 +        --virt                          Virtualization report 
 +        -x,--executable                 eXecutable name report 
 +        If no report is given, the summary report will be displayed
 </code> </code>
  
-===La Commande ausearch===+==La Commande ausearch==
  
-Cette commande est utilisée pour rechercher des évènements. Par exemple, pour rechercher les évènements liés à un utilisateur représenté par son UID :+Cette commande est utilisée pour rechercher des événements. Par exemple, pour rechercher les événements liés à un utilisateur représenté par son UID :
  
 <code> <code>
-root@debian8:~# ausearch -ui 1000 | more+root@debian11:~# exit 
 +logout 
 +trainee@debian11:~$ su - 
 +Password: fenestros 
 +root@debian11:~# ausearch -ui 1000 | more
 ---- ----
-time->Wed Oct 28 14:31:30 2015 +time->Fri Apr 29 14:31:05 2022 
-type=USER_END msg=audit(1446039090.595:853): pid=1558 uid=1000 auid=1000 ses=msg='op=PAM:session_cl +type=USER_END msg=audit(1651235465.623:36): pid=45426 uid=1000 auid=1000 ses=142 subj==unconfined msg='op=PAM:session_close grantors=pam_keyinit,pam_env,pa 
-ose acct="root" exe="/bin/su" hostname=addr=? terminal=/dev/pts/0 res=success'+m_env,pam_mail,pam_limits,pam_permit,pam_unix,pam_systemd,pam_ecryptfs acct="root" exe="/usr/bin/su" hostname=debian11 addr=? terminal=pts/0 res=success'
 ---- ----
-time->Wed Oct 28 14:31:30 2015 +time->Fri Apr 29 14:31:05 2022 
-type=CRED_DISP msg=audit(1446039090.595:854): pid=1558 uid=1000 auid=1000 ses=msg='op=PAM:setcred a +type=CRED_DISP msg=audit(1651235465.623:37): pid=45426 uid=1000 auid=1000 ses=142 subj==unconfined msg='op=PAM:setcred grantors=pam_permit,pam_ecryptfs acc 
-cct="root" exe="/bin/su" hostname=addr=? terminal=/dev/pts/0 res=success'+t="root" exe="/usr/bin/su" hostname=debian11 addr=? terminal=pts/0 res=success'
 ---- ----
-time->Wed Oct 28 14:31:38 2015 +time->Fri Apr 29 14:31:11 2022 
-type=USER_AUTH msg=audit(1446039098.083:855): pid=4513 uid=1000 auid=1000 ses=msg='op=PAM:authentic +type=USER_AUTH msg=audit(1651235471.067:38): pid=45693 uid=1000 auid=1000 ses=142 subj==unconfined msg='op=PAM:authentication grantors=pam_permit,pam_ecryp 
-ation acct="root" exe="/bin/su" hostname=addr=? terminal=/dev/pts/0 res=failed'+tfs acct="root" exe="/usr/bin/su" hostname=debian11 addr=? terminal=pts/0 res=success'
 ---- ----
-time->Wed Oct 28 14:31:46 2015 +time->Fri Apr 29 14:31:11 2022 
-type=USER_AUTH msg=audit(1446039106.663:856): pid=4514 uid=1000 auid=1000 ses=msg='op=PAM:authentic +type=USER_ACCT msg=audit(1651235471.067:39): pid=45693 uid=1000 auid=1000 ses=142 subj==unconfined msg='op=PAM:accounting grantors=pam_permit acct="root" 
-ation acct="root" exe="/bin/su" hostname=addr=? terminal=/dev/pts/0 res=success'+xe="/usr/bin/su" hostname=debian11 addr=? terminal=pts/0 res=success'
 ---- ----
-time->Wed Oct 28 14:31:46 2015 +time->Fri Apr 29 14:31:11 2022 
-type=USER_ACCT msg=audit(1446039106.663:857): pid=4514 uid=1000 auid=1000 ses=msg='op=PAM:accountin +type=CRED_ACQ msg=audit(1651235471.067:40): pid=45693 uid=1000 auid=1000 ses=142 subj==unconfined msg='op=PAM:setcred grantors=pam_permit,pam_ecryptfs acct 
-acct="root" exe="/bin/su" hostname=addr=? terminal=/dev/pts/0 res=success'+="root" exe="/usr/bin/su" hostname=debian11 addr=? terminal=pts/0 res=success'
 ---- ----
-time->Wed Oct 28 14:31:46 2015 +time->Fri Apr 29 14:31:11 2022 
-type=CRED_ACQ msg=audit(1446039106.663:858): pid=4514 uid=1000 auid=1000 ses=msg='op=PAM:setcred ac +type=USER_START msg=audit(1651235471.071:41): pid=45693 uid=1000 auid=1000 ses=142 subj==unconfined msg='op=PAM:session_open grantors=pam_keyinit,pam_env,p 
---More--+am_env,pam_mail,pam_limits,pam_permit,pam_unix,pam_systemd,pam_ecryptfs acct="root" exe="/usr/bin/su" hostname=debian11 addr=? terminal=pts/0 res=success'
 </code> </code>
- 
-==Options de la Commande== 
  
 Les options de cette commande sont : Les options de cette commande sont :
  
 <code> <code>
-root@debian8:~# ausearch --help+root@debian11:~# ausearch --help
 usage: ausearch [options] usage: ausearch [options]
- -a,--event <Audit event id> search based on audit event id +        -a,--event <Audit event id>     search based on audit event id 
- --arch <CPU> search based on the CPU architecture +        --arch <CPU>                    search based on the CPU architecture 
- -c,--comm  <Comm name> search based on command line name +        -c,--comm  <Comm name>          search based on command line name 
- --checkpoint <checkpoint file> search from last complete event +        --checkpoint <checkpoint file>  search from last complete event 
- --debug Write malformed events that are skipped to stderr +        --debug                 Write malformed events that are skipped to stderr 
- -e,--exit  <Exit code or errno> search based on syscall exit code +        -e,--exit  <Exit code or errno> search based on syscall exit code 
- -f,--file  <File name> search based on file name +        -f,--file  <File name>          search based on file name 
- -ga,--gid-all <all Group id> search based on All group ids +        --format [raw|default|interpret|csv|text] results format options 
- -ge,--gid-effective <effective Group id>  search based on Effective +        -ga,--gid-all <all Group id>    search based on All group ids 
- group id +        -ge,--gid-effective <effective Group id>  search based on Effective 
- -gi,--gid <Group Id> search based on group id +                                        group id 
- -h,--help help +        -gi,--gid <Group Id>            search based on group id 
- -hn,--host <Host Name> search based on remote host name +        -h,--help                       help 
- -i,--interpret Interpret results to be human readable +        -hn,--host <Host Name>          search based on remote host name 
- -if,--input <Input File name> use this file instead of current logs +        -i,--interpret                  Interpret results to be human readable 
- --input-logs Use the logs even if stdin is a pipe +        -if,--input <Input File name>   use this file instead of current logs 
- --just-one Emit just one event +        --input-logs                    Use the logs even if stdin is a pipe 
- -k,--key  <key string> search based on key field +        --just-one                      Emit just one event 
- -l, --line-buffered Flush output on every line +        -k,--key  <key string>          search based on key field 
- -m,--message  <Message type> search based on message type +        -l, --line-buffered             Flush output on every line 
- -n,--node  <Node name> search based on machine's name +        -m,--message  <Message type>    search based on message type 
- -o,--object  <SE Linux Object context> search based on context of object +        -n,--node  <Node name>          search based on machine's name 
- -p,--pid  <Process id> search based on process id +        -o,--object  <SE Linux Object context> search based on context of object 
- -pp,--ppid <Parent Process id> search based on parent process id +        -p,--pid  <Process id>          search based on process id 
- -r,--raw output is completely unformatted +        -pp,--ppid <Parent Process id>  search based on parent process id 
- -sc,--syscall <SysCall name> search based on syscall name or number +        -r,--raw                        output is completely unformatted 
- -se,--context <SE Linux context> search based on either subject or +        -sc,--syscall <SysCall name>    search based on syscall name or number 
-  object +        -se,--context <SE Linux context> search based on either subject or 
- --session <login session id> search based on login session id +                                         object 
- -su,--subject <SE Linux context> search based on context of the Subject +        --session <login session id>    search based on login session id 
- -sv,--success <Success Value> search based on syscall or event +        -su,--subject <SE Linux context> search based on context of the Subject 
- success value +        -sv,--success <Success Value>   search based on syscall or event 
- -te,--end [end date] [end time] ending date & time for search +                                        success value 
- -ts,--start [start date] [start time] starting data & time for search +        -te,--end [end date] [end time] ending date & time for search 
- -tm,--terminal <TerMinal> search based on terminal +        -ts,--start [start date] [start time]   starting date & time for search 
- -ua,--uid-all <all User id> search based on All user id's +        -tm,--terminal <TerMinal>       search based on terminal 
- -ue,--uid-effective <effective User id>  search based on Effective +        -ua,--uid-all <all User id>     search based on All user id's 
- user id +        -ue,--uid-effective <effective User id>  search based on Effective 
- -ui,--uid <User Id> search based on user id +                                        user id 
- -ul,--loginuid <login id> search based on the User's Login id +        -ui,--uid <User Id>             search based on user id 
- -uu,--uuid <guest UUID> search for events related to the virtual +        -ul,--loginuid <login id>       search based on the User's Login id 
- machine with the given UUID. +        -uu,--uuid <guest UUID>         search for events related to the virtual 
- -v,--version version +                                        machine with the given UUID. 
- -vm,--vm-name <guest name> search for events related to the virtual +        -v,--version                    version 
- machine with the name. +        -vm,--vm-name <guest name>      search for events related to the virtual 
- -w,--word string matches are whole word +                                        machine with the name. 
- -x,--executable <executable name>  search based on executable name+        -w,--word                       string matches are whole word 
 +        -x,--executable <executable name>  search based on executable name
 </code> </code>
  
Ligne 691: Ligne 722:
  
 Ce fichier contient la plupart des messages du système : Ce fichier contient la plupart des messages du système :
- 
  
 <code> <code>
-root@debian8:~# tail -n 15 /var/log/messages +root@debian11:~# tail -n 15 /var/log/messages 
-Oct 28 06:37:21 debian8 kernel: [17310.156006audit: type=1305 audit(1446010641.567:2)audit_pid=3789 old=0 auid=4294967295 ses=4294967295 res=1 +Apr 28 06:43:12 debian11 kernel: [149698.386556Adding 262140k swap on /swap Priority:-3 extents:4 across:286716k FS 
-Oct 28 06:54:50 debian8 kernel: [18358.844152usb 1-1: USB disconnect, device number 4 +Apr 28 06:43:47 debian11 kernel: [149733.302599Adding 998396k swap on /dev/sda5.  Priority:-2 extents:across:998396k FS 
-Oct 28 06:54:50 debian8 kernel: [18359.429167usb 1-1new full-speed USB device number 5 using ohci-pci +Apr 28 06:44:00 debian11 kernel: [149746.478556Adding 262140k swap on /swap.  Priority:-3 extents:4 across:286716k FS 
-Oct 28 06:54:51 debian8 kernel: [18359.707784] usb 1-1: New USB device found, idVendor=80ee, idProduct=0021 +Apr 28 16:47:22 debian11 pipewire-media-session[34487]: error id:0 seq:158 res:-32 (Broken pipe)connection error 
-Oct 28 06:54:51 debian8 kernel: [18359.707791usb 1-1New USB device stringsMfr=1, Product=3, SerialNumber=0 +Apr 29 00:00:03 debian11 kernel: [211909.512230audittype=1400 audit(1651183203.717:23): apparmor="DENIED" operation="capable" profile="/usr/sbin/cupsd" pid=44753 comm="cupsd" capability=12  capname="net_admin" 
-Oct 28 06:54:51 debian8 kernel: [18359.707794] usb 1-1: ProductUSB Tablet +Apr 29 00:00:03 debian11 kernel: [211909.537867audittype=1400 audit(1651183203.741:24)apparmor="DENIED" operation="capable" profile="/usr/sbin/cups-browsed" pid=44754 comm="cups-browsed" capability=23  capname="sys_nice" 
-Oct 28 06:54:51 debian8 kernel: [18359.707797usb 1-1ManufacturerVirtualBox +Apr 29 14:17:31 debian11 pipewire[45354]: could not set nice-level to -11Permission denied 
-Oct 28 06:54:51 debian8 kernel: [18359.717328inputVirtualBox USB Tablet as /devices/pci0000:00/0000:00:06.0/usb1/1-1/1-1:1.0/0003:80EE:0021.0004/input/input11 +Apr 29 14:17:31 debian11 pipewire[45354]could not make thread realtimePermission denied 
-Oct 28 06:54:51 debian8 mtp-probechecking bus 1, device 5"/sys/devices/pci0000:00/0000:00:06.0/usb1/1-1" +Apr 29 14:17:31 debian11 pipewire-media-session[45364]could not set nice-level to -11Permission denied 
-Oct 28 06:54:51 debian8 mtp-probebus1, device: 5 was not an MTP device +Apr 29 14:17:31 debian11 pipewire-media-session[45364]: could not make thread realtimePermission denied 
-Oct 28 06:54:51 debian8 kernel: [18359.717846hid-generic 0003:80EE:0021.0004input,hidraw0USB HID v1.10 Mouse [VirtualBox USB Tableton usb-0000:00:06.0-1/input0 +Apr 29 14:22:13 debian11 pipewire-media-session[45364]: error id:0 seq:158 res:-32 (Broken pipe): connection error 
-Oct 28 06:54:51 debian8 kernel: [18359.798364e1000eth0 NIC Link is Down +Apr 29 14:22:47 debian11 pipewire[45411]: could not set nice-level to -11: Permission denied 
-Oct 28 12:30:24 debian8 kernel: [18365.868629e1000eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow ControlRX +Apr 29 14:22:47 debian11 pipewire[45411]: could not make thread realtimePermission denied 
-Oct 28 12:30:24 debian8 kernel: [18365.869262IPv6ADDRCONF(NETDEV_CHANGE)eth0: link becomes ready +Apr 29 14:22:47 debian11 pipewire-media-session[45423]: could not set nice-level to -11Permission denied 
-Oct 28 14:11:01 debian8 rsyslogd-2007action 'action 17' suspended, next retry is Wed Oct 28 14:11:31 2015 [try http://www.rsyslog.com/e/2007 ]+Apr 29 14:22:47 debian11 pipewire-media-session[45423]could not make thread realtimePermission denied
 </code> </code>
  
Ligne 721: Ligne 751:
  
 <code> <code>
-root@debian8:~# ls -l /var/log +root@debian11:~# ls -l /var/log 
-total 1388 +total 1884 
--rw-r--r-- 1 root              root    718 Oct 23 17:09 alternatives.log +-rw-r--r--  1 root              root             46300 Apr 25 17:08 alternatives.log 
-drwxr-xr-x 2 root              root   4096 Oct 23 16:37 apt +drwxr-xr-x  2 root              root              4096 Apr 29 14:24 apt 
-drwxr-x--- 2 root              root   4096 Oct 28 06:37 audit +drwxr-x---  2 root              adm               4096 Apr 29 14:24 audit 
--rw-r----- 1 root              adm   96160 Oct 28 14:52 auth.log +-rw-r-----  1 root              adm              50109 Apr 29 14:31 auth.log 
--rw-r----- 1 root              adm    8318 Oct 26 11:22 auth.log.1 +-rw-------  1 root              root                 0 Apr 27 00:00 boot.log 
--rw-r--r-- 1 root              root      0 Jun  6 17:19 bootstrap.log +-rw-------  1 root              root             15065 Apr 27 00:00 boot.log.1 
--rw------- 1 root              utmp      0 Jun  6 17:19 btmp +-rw-rw----  1 root              utmp              2304 Apr 29 14:22 btmp 
-drwxr-xr-x 2 root              root   4096 Oct 26 11:27 cups +drwxr-xr-x  2 root              root              4096 Apr 29 00:00 cups 
--rw-r----- 1 root              adm   45007 Oct 28 12:30 daemon.log +-rw-r-----  1 root              adm             175380 Apr 29 14:24 daemon.log 
--rw-r----- 1 root              adm   77008 Oct 26 11:22 daemon.log.1 +-rw-r-----  1 root              adm              23560 Apr 29 14:22 debug 
--rw-r----- 1 root              adm    9127 Oct 28 06:37 debug +-rw-r--r--  1 root              root            666074 Apr 29 14:24 dpkg.log 
--rw-r----- 1 root              adm   35138 Oct 26 11:22 debug.1 +-rw-r--r--  1 root              root             32032 Apr 25 07:04 faillog 
--rw-r----- 1 root              adm       0 Jun  6 17:19 dmesg +-rw-r--r--  1 root              root              4939 Apr 25 06:54 fontconfig.log 
--rw-r--r-- 1 root              root 130612 Oct 28 06:37 dpkg.log +drwxr-xr-x  root              root              4096 Apr 28 06:00 installer 
-drwxr-s--- 2 Debian-exim       adm    4096 Oct 26 11:27 exim4 +drwxr-sr-x3 root              systemd-journal   4096 Apr 25 07:01 journal 
--rw-r--r-- 1 root              root  24024 Oct 23 16:59 faillog +-rw-r-----  1 root              adm             186224 Apr 29 00:00 kern.log 
--rw-r--r-- 1 root              root      0 Jun  6 17:19 fontconfig.log +-rw-rw-r--  1 root              utmp            292292 Apr 29 14:22 lastlog 
-drwxr-xr-x root              root   4096 Oct 23 16:37 fsck +drwx--x--x  2 root              root              4096 Apr 26 13:08 lightdm 
-drwxr-xr-x 3 root              root   4096 Oct 23 16:37 hp +-rw-r-----  1 root              adm             181928 Apr 29 14:22 messages 
-drwxr-xr-x 3 root              root   4096 Oct 23 16:45 installer +drwx------  2 root              root              4096 Apr 25 07:01 private 
--rw-r----- 1 root              adm   48698 Oct 28 12:30 kern.log +drwxr-xr-x  3 root              root              4096 Apr 25 07:04 runit 
--rw-r----- 1 root              adm  180412 Oct 26 11:22 kern.log.1 +drwx------  2 speech-dispatcher root              4096 Sep 19  2021 speech-dispatcher 
--rw-rw-r-- 1 root              utmp 292292 Oct 23 16:59 lastlog +-rw-r-----  1 root              adm             411969 Apr 29 14:30 syslog 
-drwx--x--x 2 root              root   4096 Oct 26 13:52 lightdm +-rw-r-----  1 root              adm              10969 Apr 29 14:22 user.log 
--rw-r----- 1 root              adm   42656 Oct 28 14:11 messages +-rw-rw-r--  1 root              utmp             10368 Apr 29 14:22 wtmp 
--rw-r----- root              adm  155184 Oct 26 11:27 messages.1 +-rw-r--r--  1 root              root             21631 Apr 26 13:08 Xorg.0.log 
-drwx------ 2 speech-dispatcher root   4096 Dec  5  2014 speech-dispatcher +-rw-r--r--  1 root              root             21631 Apr 25 07:08 Xorg.0.log.old
--rw-r----- 1 root              adm  131678 Oct 28 14:52 syslog +
--rw-r----- 1 root              adm  269816 Oct 26 11:27 syslog.1 +
--rw-r----- 1 root              adm    2391 Oct 28 06:54 user.log +
--rw-r----- 1 root              adm   10169 Oct 26 11:23 user.log.1 +
--rw-r--r-- 1 root              root   1195 Oct 23 16:59 vboxadd-install.log +
--rw-r--r-- 1 root              root     73 Oct 23 16:59 vboxadd-install-x11.log +
--rw-r--r-- 1 root              root     75 Oct 23 16:59 VBoxGuestAdditions.log +
--rw-rw-r-- 1 root              utmp  13440 Oct 26 14:21 wtmp +
--rw-r--r-- 1 root              root  29935 Oct 28 06:54 Xorg.0.log +
--rw-r--r-- 1 root              root  22097 Oct 26 11:22 Xorg.0.log.old+
 </code> </code>
  
-=====rsyslog=====+=====LAB #2 - rsyslog=====
  
 **rsyslog**, le successeur de syslog, centralise les journaux du système grâce au daemon **rsyslog**.  **rsyslog**, le successeur de syslog, centralise les journaux du système grâce au daemon **rsyslog**. 
Ligne 783: Ligne 803:
   * transmettre les informations à une application liée à rsyslog via un tube (par exemple, **|logrotate**).   * transmettre les informations à une application liée à rsyslog via un tube (par exemple, **|logrotate**).
  
-Sous Debian, le daemon rsyslog est configuré par l'édition du fichier **/etc/default/rsyslog** : +====2.1 - Priorités====
- +
-<code> +
-root@debian8:~# cat /etc/default/rsyslog +
-# Options for rsyslogd +
-# -x disables DNS lookups for remote messages +
-# See rsyslogd(8) for more details +
-RSYSLOGD_OPTIONS="" +
-</code> +
- +
-L'option **-c** de la directive **SYSLOGD_OPTIONS** spécifie le niveau de compatibilité avec les anciennes versions de rsyslog ainsi qu'avec son prédécesseur syslogd : +
- +
-^ Directive ^ Version ^ +
-| SYSLOGD_OPTIONS="-c 4" | Mode natif - aucune compatibilité | +
-| SYSLOGD_OPTIONS="-c 2" | rsyslog V2 mode compatibilité | +
-| SYSLOGD_OPTIONS="-c 0" | syslogd | +
- +
-<WRAP center round important> +
-**Important** : Notez que l'emplacement du fichier **rsyslog** n'est pas le même. +
-</WRAP> +
- +
-====Priorités====+
  
 La **Priorité** permet d'indiquer à rsyslog l'importance des informations : La **Priorité** permet d'indiquer à rsyslog l'importance des informations :
Ligne 818: Ligne 817:
 | 7 | debug | Condition normale - message de débogage |  | 7 | debug | Condition normale - message de débogage | 
  
-====Sous-systèmes applicatifs====+====2.2 - Sous-systèmes applicatifs====
  
 Le **Sous-système applicatif**, aussi appelé **facility**, permet d'indiquer à rsyslog le type de programme qui envoie les informations : Le **Sous-système applicatif**, aussi appelé **facility**, permet d'indiquer à rsyslog le type de programme qui envoie les informations :
Ligne 835: Ligne 834:
 | local0 - local7 | Réservés pour des utilisations locales | | local0 - local7 | Réservés pour des utilisations locales |
  
-====/etc/rsyslog.conf====+====2.3 - /etc/rsyslog.conf====
  
 rsyslog est configuré par le fichier **/etc/rsyslog.conf** : rsyslog est configuré par le fichier **/etc/rsyslog.conf** :
  
 <code> <code>
-root@debian8:~# cat /etc/rsyslog.conf +root@debian11:~# cat /etc/rsyslog.conf 
- /etc/rsyslog.conf Configuration file for rsyslog.+# /etc/rsyslog.conf configuration file for rsyslog
 # #
-# For more information see +# For more information install rsyslog-doc and see 
-# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html+# /usr/share/doc/rsyslog-doc/html/configuration/index.html
  
  
Ligne 851: Ligne 850:
 ################# #################
  
-$ModLoad imuxsock # provides support for local system logging +module(load="imuxsock"# provides support for local system logging 
-$ModLoad imklog   # provides kernel logging support +module(load="imklog"  # provides kernel logging support 
-#$ModLoad immark  # provides --MARK-- message capability+#module(load="immark" # provides --MARK-- message capability
  
 # provides UDP syslog reception # provides UDP syslog reception
-#$ModLoad imudp +#module(load="imudp") 
-#$UDPServerRun 514+#input(type="imudp" port="514")
  
 # provides TCP syslog reception # provides TCP syslog reception
-#$ModLoad imtcp +#module(load="imtcp") 
-#$InputTCPServerRun 514+#input(type="imtcp" port="514")
  
  
Ligne 901: Ligne 900:
 # First some standard log files.  Log by facility. # First some standard log files.  Log by facility.
 # #
-auth,authpriv.* /var/log/auth.log +auth,authpriv.*                 /var/log/auth.log 
-*.*;auth,authpriv.none -/var/log/syslog +*.*;auth,authpriv.none          -/var/log/syslog 
-#cron.* /var/log/cron.log +#cron.*                         /var/log/cron.log 
-daemon.* -/var/log/daemon.log +daemon.*                        -/var/log/daemon.log 
-kern.* -/var/log/kern.log +kern.*                          -/var/log/kern.log 
-lpr.* -/var/log/lpr.log +lpr.*                           -/var/log/lpr.log 
-mail.* -/var/log/mail.log +mail.*                          -/var/log/mail.log 
-user.* -/var/log/user.log+user.*                          -/var/log/user.log
  
 # #
Ligne 914: Ligne 913:
 # it is easy to write scripts to parse these files. # it is easy to write scripts to parse these files.
 # #
-mail.info -/var/log/mail.info +mail.info                       -/var/log/mail.info 
-mail.warn -/var/log/mail.warn +mail.warn                       -/var/log/mail.warn 
-mail.err /var/log/mail.err +mail.err                        /var/log/mail.err
- +
-+
-# Logging for INN news system. +
-+
-news.crit /var/log/news/news.crit +
-news.err /var/log/news/news.err +
-news.notice -/var/log/news/news.notice+
  
 # #
Ligne 929: Ligne 921:
 # #
 *.=debug;\ *.=debug;\
- auth,authpriv.none;+        auth,authpriv.none;
- news.none;mail.none -/var/log/debug+        mail.none               -/var/log/debug
 *.=info;*.=notice;*.=warn;\ *.=info;*.=notice;*.=warn;\
- auth,authpriv.none;+        auth,authpriv.none;
- cron,daemon.none;+        cron,daemon.none;
- mail,news.none -/var/log/messages+        mail.none               -/var/log/messages
  
 # #
 # Emergencies are sent to everybody logged in. # Emergencies are sent to everybody logged in.
 # #
-*.emerg :omusrmsg:* +*.emerg                         :omusrmsg:*
- +
-+
-# I like to have messages displayed on the console, but only on a virtual +
-# console I usually leave idle. +
-+
-#daemon,mail.*;+
-# news.=crit;news.=err;news.=notice;+
-# *.=debug;*.=info;+
-# *.=notice;*.=warn /dev/tty8 +
- +
-# The named pipe /dev/xconsole is for the `xconsole' utility.  To use it, +
-# you must invoke `xconsole' with the `-file' option: +
-#  +
-#    $ xconsole -file /dev/xconsole [...] +
-+
-# NOTE: adjust the list below, or you'll go crazy if you have a reasonably +
-#      busy site.. +
-+
-daemon.*;mail.*;+
- news.err;+
- *.=debug;*.=info;+
- *.=notice;*.=warn |/dev/xconsole+
 </code> </code>
  
 Ce fichier est divisé en 3 parties : Ce fichier est divisé en 3 parties :
  
-  * **Modules**,+  * **MODULES**,
     * Section traitant le chargement des modules offrant des fonctionnalités étendues à rsyslog,     * Section traitant le chargement des modules offrant des fonctionnalités étendues à rsyslog,
-  * **Directives Globales** (//Global Directives//),+  * **GLOBAL DIRECTIVES**,
     * Section traitant les options de comportement global du service rsyslog,     * Section traitant les options de comportement global du service rsyslog,
-  * **Règles** (//Rules//)+  * **RULES**, 
-    * Section traitant les règles de configuration des journaux. Les règles au format syslogd gardent le même format. Les nouvelles règles, compatibles seulement avec rsyslog commencent par **$**. +    * Section traitant les règles de configuration des journaux. Les règles au format syslogd gardent le même format. Les nouvelles règles, compatibles seulement avec rsyslog commencent par **module**.
- +
-<WRAP center round important> +
-**Important** : Notez que les versions du fichier **/etc/rsyslog.conf** diffèrent entre RHEL/CentOS et Debian. +
-</WRAP>+
  
 ===Modules=== ===Modules===
Ligne 982: Ligne 948:
  
 ^ Module ^ Fonction ^ ^ Module ^ Fonction ^
-$ModLoad imuxsock.so | Active la trace des messages locaux, per exemple de la commande **logger** | +module(load="imuxsock"| Active la trace des messages locaux, per exemple de la commande **logger** | 
-$ModLoad imklog.so | Active la trace de messages du **noyau** | +module(load="imklog"| Active la trace de messages du **noyau** | 
-$ModLoad immark.so | Active la trace des messages de type **mark** | +module(load="immark"| Active la trace des messages de type **mark** | 
-$ModLoad imudp.so | Active la réception de messages en utilisant le protocole **UDP** | +module(load="imudp"| Active la réception de messages en utilisant le protocole **UDP** | 
-$ModLoad imtcp.so | Active la réception de messages en utilisant le protocole **TCP** |+module(load="imtcp"| Active la réception de messages en utilisant le protocole **TCP** |
  
-Dans le fichier **/etc/rsyslog.conf** nous pouvons constater que les inputs **$ModLoad imuxsock.so** et **$ModLoad imklog.so** sont activés :+Dans le fichier **/etc/rsyslog.conf** nous pouvons constater que les inputs **module(load="imuxsock")** et *module(load="imklog")** sont activés :
  
 <file> <file>
Ligne 994: Ligne 960:
   * **#### MODULES ####   * **#### MODULES ####
  
-$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command) +module(load="imuxsock"# provides support for local system logging 
-$ModLoad imklog.so # provides kernel logging support (previously done by rklogd) +module(load="imklog"  # provides kernel logging support 
-#$ModLoad immark.so # provides --MARK-- message capability+#module(load="immark")  # provides --MARK-- message capability
  
-Provides UDP syslog reception +provides UDP syslog reception 
-#$ModLoad imudp.so +#module(load="imudp") 
-#$UDPServerRun 514+#input(type="imudp" port="514")
  
-Provides TCP syslog reception +provides TCP syslog reception 
-#$ModLoad imtcp.so   +#module(load="imtcp") 
-#$InputTCPServerRun 514+#input(type="imtcp" port="514")
 ... ...
 </file> </file>
  
-Pour activer la réception de messages à partir de serveurs rsyslog distants en utilisant le protocole **UDP**, il convient de décommenter les directives de chargement de modules dans le fichier **/etc/rsyslog.conf** et de re-démarrer le service :+Pour activer la réception de messages à partir de serveurs rsyslog distants en utilisant les protocoles **UDP** et **TCP**, il convient de décommenter les directives de chargement de modules dans le fichier **/etc/rsyslog.conf** et de re-démarrer le service :
  
 <file> <file>
Ligne 1014: Ligne 980:
   * **#### MODULES ####   * **#### MODULES ####
  
-$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command) +module(load="imuxsock"# provides support for local system logging 
-$ModLoad imklog.so # provides kernel logging support (previously done by rklogd) +module(load="imklog"  # provides kernel logging support 
-#$ModLoad immark.so # provides --MARK-- message capability+#module(load="immark")  # provides --MARK-- message capability
  
-Provides UDP syslog reception +provides UDP syslog reception 
-$ModLoad imudp.so +module(load="imudp") 
-$UDPServerRun 514+input(type="imudp" port="514")
  
-Provides TCP syslog reception +provides TCP syslog reception 
-$ModLoad imtcp.so   +module(load="imtcp") 
-$InputTCPServerRun 514+input(type="imtcp" port="514")
 ... ...
 </file> </file>
  
 <WRAP center round important> <WRAP center round important>
-**Important** : Les deux directives **$ModLoad imudp.so** et **$UDPServerRun 514** crée un ** Écouteur** sur le port UDP/514 tandis que les deux directives **$ModLoad imtcp.so** et **$InputTCPServerRun 514** crée un Écouteur sur le port TCP/514. Le port 514 est le port standard pour les Écouteurs de rsyslog. Cependant il est possible de modifier le port utilisé en modifiant la valeur dans la directive **$UDPServerRun** ou **$InputTCPServerRun**. Par exemple : **$InputTCPServerRun 1514**.+**Important** : Les deux directives **module(load="imudp")** et **input(type="imudp" port="514")** crée un ** Écouteur** sur le port UDP/514 tandis que les deux directives **module(load="imtcp")** et **input(type="imtcp" port="514")** crée un Écouteur sur le port TCP/514. Le port 514 est le port standard pour les Écouteurs de rsyslog. Cependant il est possible de modifier le port utilisé en modifiant la valeur dans la directive , par exemple : **input(type="imtcp" port="1514")**.
 </WRAP> </WRAP>
  
-Pour envoyer l'ensemble des traces de journalisation vers un serveur rsyslog distant, il convient de décommenter ou d'ajouter les lignes dans la section suivante du fichier **/etc/rsyslog.conf** :+Pour envoyer l'ensemble des traces de journalisation vers un serveur rsyslog distant, il convient d'ajouter la section suivante à la fin du fichier.
  
 <file> <file>
Ligne 1044: Ligne 1010:
 # An on-disk queue is created for this action. If the remote host is # An on-disk queue is created for this action. If the remote host is
 # down, messages are spooled to disk and sent when it is up again. # down, messages are spooled to disk and sent when it is up again.
-$WorkDirectory /var/spppl/rsyslog # where to place spool files 
 $ActionQueueFileName fwdRule1 # unique name prefix for spool files $ActionQueueFileName fwdRule1 # unique name prefix for spool files
 $ActionQueueMaxDiskSpace 1g   # 1gb space limit (use as much as possible) $ActionQueueMaxDiskSpace 1g   # 1gb space limit (use as much as possible)
Ligne 1051: Ligne 1016:
 $ActionResumeRetryCount -1    # infinite retries if host is down $ActionResumeRetryCount -1    # infinite retries if host is down
 # remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional # remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
-*.* @@remote-host:514+# *.* @remote-host:514 # Pour utiliser le protocol UDP au cas où le protocol TCP n'est pas disponible sur le serveur distant 
 +*.* @@remote-host:514 # Pour utiliser le protocol TCP
 # ### end of the forwarding rule ### # ### end of the forwarding rule ###
-... 
 </file> </file>
  
 <WRAP center round important> <WRAP center round important>
-**Important** : Ces directives utilisent le protocole TCP. Le serveur distant doit donc être configuré pour ce mode de communication.La directive ***.@@remote-host:514** doit être modifiée pour indiquer l'adresse IP du serveur rsyslog distant.+**Important** : La valeur de **remote-host** doit être modifiée pour indiquer l'adresse IP du serveur rsyslog distant.
 </WRAP> </WRAP>
  
Ligne 1108: Ligne 1073:
 </WRAP> </WRAP>
  
-=====La Commande logger=====+=====LAB #3 - La Commande logger=====
  
 La commande **/usr/bin/logger** permet d'intégrer des informations dans rsyslog. Ceci peut s'avérer utile dans des scripts bash. La commande **/usr/bin/logger** permet d'intégrer des informations dans rsyslog. Ceci peut s'avérer utile dans des scripts bash.
Ligne 1121: Ligne 1086:
  
 <code> <code>
-root@debian8:~# logger -p user.info Linux est super+root@debian11:~# logger -p user.info Linux est super
 </code> </code>
  
Ligne 1127: Ligne 1092:
  
 <code> <code>
-root@debian8:~# tail /var/log/messages +root@debian11:~# tail /var/log/messages 
-Oct 28 15:01:50 debian8 pulseaudio[1278]: Disabling timer-based scheduling because running inside a VM. +Apr 29 14:17:31 debian11 pipewire[45354]: could not set nice-level to -11: Permission denied 
-Oct 28 15:01:50 debian8 pulseaudio[1278]: Disabling timer-based scheduling because running inside a VM. +Apr 29 14:17:31 debian11 pipewire[45354]: could not make thread realtime: Permission denied 
-Oct 28 15:01:52 debian8 org.gnome.OnlineAccounts[1245]: goa-daemon-Messagegoa-daemon version 3.14.2 starting +Apr 29 14:17:31 debian11 pipewire-media-session[45364]: could not set nice-level to -11Permission denied 
-Oct 28 15:01:53 debian8 org.gnome.OnlineAccounts[1245]: (goa-daemon:1318)goa-daemon-CRITICAL **Error preparing AMThe name org.freedesktop.Telepathy.AccountManager was not provided by any .service files +Apr 29 14:17:31 debian11 pipewire-media-session[45364]: could not make thread realtimePermission denied 
-Oct 28 15:01:53 debian8 org.gtk.Private.AfcVolumeMonitor[1245]Volume monitor alive +Apr 29 14:22:13 debian11 pipewire-media-session[45364]error id:0 seq:158 res:-32 (Broken pipe)connection error 
-Oct 28 15:01:57 debian8 vmusr[1368]: [ warning] [vmusr] Error creating backup of old config file. +Apr 29 14:22:47 debian11 pipewire[45411]: could not set nice-level to -11: Permission denied 
-Oct 28 15:01:57 debian8 vmusr[1368]: [ warning] [vmtoolsd] The vmusr service needs to run inside a virtual machine. +Apr 29 14:22:47 debian11 pipewire[45411]: could not make thread realtime: Permission denied 
-Oct 28 15:01:59 debian8 org.gnome.zeitgeist.Engine[1245]: ** (zeitgeist-datahub:1421): WARNING **: zeitgeist-datahub.vala:226: Unable to get name "org.gnome.zeitgeist.datahub" on the bus! +Apr 29 14:22:47 debian11 pipewire-media-session[45423]: could not set nice-level to -11Permission denied 
-Oct 28 15:08:21 debian8 kernel: [  778.981705hrtimerinterrupt took 3109967 ns +Apr 29 14:22:47 debian11 pipewire-media-session[45423]: could not make thread realtime: Permission denied 
-Oct 28 15:49:23 debian8 trainee: Linux est super+Apr 29 15:06:18 debian11 trainee: Linux est super
 </code> </code>
- 
-====Options de la commande==== 
  
 Les options de la commande logger sont : Les options de la commande logger sont :
  
 <code> <code>
-root@debian8:~# logger --help+root@debian11:~# logger --help
  
 Usage: Usage:
  logger [options] [<message>]  logger [options] [<message>]
 +
 +Enter messages into the system log.
  
 Options: Options:
- -T, --tcp             use TCP only + -i                       log the logger command's PID 
- -d, --udp             use UDP only +     --id[=<id>         log the given <id>, or otherwise the PID 
- -i, --id              log the process ID too + -f, --file <file>        log the contents of this file 
- -f, --file <file>     log the contents of this file + -e, --skip-empty         do not log empty lines when processing files 
- -n, --server <name>   write to this remote syslog server +     --no-act             do everything except the write the log 
- -P, --port <number>   use this UDP port + -p, --priority <prio>    mark given message with this priority 
- -p, --priority <prio> mark given message with this priority +     --octet-count        use rfc6587 octet counting 
-     --prio-prefix     look for a prefix on every line read from stdin +     --prio-prefix        look for a prefix on every line read from stdin 
- -s, --stderr          output message to standard error as well + -s, --stderr             output message to standard error as well 
- -t, --tag <tag>       mark every line with this tag + -S, --size <size>        maximum size for a single message 
- -u, --socket <socket> write to this Unix socket+ -t, --tag <tag>          mark every line with this tag 
 + -n, --server <name>      write to this remote syslog server 
 + -P, --port <port>        use this port for UDP or TCP connection 
 + -T, --tcp                use TCP only 
 + -d, --udp                use UDP only 
 +     --rfc3164            use the obsolete BSD syslog protocol 
 +     --rfc5424[=<snip>  use the syslog protocol (the default for remote); 
 +                            <snip> can be notime, or notq, and/or nohost 
 +     --sd-id <id>         rfc5424 structured data ID 
 +     --sd-param <data>    rfc5424 structured data name=value 
 +     --msgid <msgid>      set rfc5424 message id field 
 + -u, --socket <socket>    write to this Unix socket 
 +     --socket-errors[=<on|off|auto>
 +                          print connection errors when using Unix sockets
      --journald[=<file> write journald entry      --journald[=<file> write journald entry
  
- -h, --help     display this help and exit + -h, --help               display this help 
- -V, --version  output version information and exit+ -V, --version            display version
  
 For more details see logger(1). For more details see logger(1).
 </code> </code>
  
- +=====LAB #4 - La Commande logrotate=====
-=====La Commande logrotate=====+
  
 Les fichiers journaux grossissent régulièrement. Le programme **/usr/sbin/logrotate** est utilisé pour effectuer des rotations de ces fichiers selon la configuration contenue dans le fichier **/etc/logrotate.conf**. Les fichiers journaux grossissent régulièrement. Le programme **/usr/sbin/logrotate** est utilisé pour effectuer des rotations de ces fichiers selon la configuration contenue dans le fichier **/etc/logrotate.conf**.
Ligne 1178: Ligne 1155:
  
 <code> <code>
-root@debian8:~# cat /etc/logrotate.conf+root@debian11:~# cat /etc/logrotate.conf
 # see "man logrotate" for details # see "man logrotate" for details
 +
 +# global options do not affect preceding include directives
 +
 # rotate log files weekly # rotate log files weekly
 weekly weekly
Ligne 1188: Ligne 1168:
 # create new (empty) log files after rotating old ones # create new (empty) log files after rotating old ones
 create create
 +
 +# use date as a suffix of the rotated file
 +#dateext
  
 # uncomment this if you want your log files compressed # uncomment this if you want your log files compressed
Ligne 1195: Ligne 1178:
 include /etc/logrotate.d include /etc/logrotate.d
  
-# no packages own wtmp, or btmp -- we'll rotate them here +# system-specific logs may also be configured here.
-/var/log/wtmp { +
-    missingok +
-    monthly +
-    create 0664 root utmp +
-    rotate 1 +
-+
- +
-/var/log/btmp { +
-    missingok +
-    monthly +
-    create 0660 root utmp +
-    rotate 1 +
-+
- +
-# system-specific logs may be configured here+
 </code> </code>
  
Ligne 1220: Ligne 1188:
   * comprimer les archives créées.   * comprimer les archives créées.
  
-La directive **include /etc/logrotate.d** indique que les configurations incluent dans le répertoire cité doivent être incorporées dans le fichier de configuration de logrotate.+La directive **include /etc/logrotate.d** indique que les configurations incluent dans le répertoire cité doivent être incorporées dans le fichier de configuration de logrotate :
  
-La deuxième partie du fichier concerne des configurations spécifiques pour certains fichiers journaux.+<code> 
 +root@debian11:~# ls -l /etc/logrotate.d/ 
 +total 44 
 +-rw-r--r-- 1 root root 120 Jan 30  2021 alternatives 
 +-rw-r--r-- 1 root root 173 Jun 10  2021 apt 
 +-rw-r--r-- 1 root root  91 Mar  2  2021 bootlog 
 +-rw-r--r-- 1 root root 130 Oct 14  2019 btmp 
 +-rw-r--r-- 1 root root 181 May 27  2021 cups-daemon 
 +-rw-r--r-- 1 root root 112 Jan 30  2021 dpkg 
 +-rw-r--r-- 1 root root  94 Jan  7  2021 ppp 
 +-rw-r--r-- 1 root root 374 Feb 17  2021 rsyslog 
 +-rw-r--r-- 1 root root 132 Sep 10  2020 sane-utils 
 +-rw-r--r-- 1 root root 677 Sep 15  2021 speech-dispatcher 
 +-rw-r--r-- 1 root root 145 Oct 14  2019 wtmp 
 +</code>
  
 <WRAP center round important> <WRAP center round important>
 **Important** : Notez que la compression des fichiers de journalisation n'est pas activée par défaut. **Important** : Notez que la compression des fichiers de journalisation n'est pas activée par défaut.
 </WRAP> </WRAP>
- 
-====Options de la commande==== 
  
 Les options de la commande logrotate sont : Les options de la commande logrotate sont :
  
 <code> <code>
-root@debian8:~# logrotate --help+root@debian11:~# logrotate --help
 Usage: logrotate [OPTION...] <configfile> Usage: logrotate [OPTION...] <configfile>
-  -d, --debug               Don't do anything, just test (implies -v)+  -d, --debug               Don't do anything, just test and print debug messages
   -f, --force               Force file rotation   -f, --force               Force file rotation
   -m, --mail=command        Command to send mail (instead of `/usr/bin/mail')   -m, --mail=command        Command to send mail (instead of `/usr/bin/mail')
   -s, --state=statefile     Path of state file   -s, --state=statefile     Path of state file
 +      --skip-state-lock     Do not lock the state file
   -v, --verbose             Display messages during rotation   -v, --verbose             Display messages during rotation
 +  -l, --log=logfile         Log file or 'syslog' to log to syslog
       --version             Display version information       --version             Display version information
  
Ligne 1247: Ligne 1229:
 </code> </code>
  
-=====La Journalisation avec journald=====+=====LAB #5 - La Journalisation avec journald=====
  
-Sous Debian 8, les fichiers de Syslog sont gardés pour une question de compatibilité. Cependant, tous les journaux sont d'abord collectés par **Journald** pour ensuite être redistribués vers les fichiers classiques se trouvant dans le répertoire /var/log. Les journaux de journald sont stockés dans un seul et unique fichier dynamique dans le répertoire **/run/log/journal** :+Sous Debian 11, les fichiers de Syslog sont gardés pour une question de compatibilité. Cependant, tous les journaux sont d'abord collectés par **Journald** pour ensuite être redistribués vers les fichiers classiques se trouvant dans le répertoire /var/log. Les journaux de journald sont stockés dans un seul et unique fichier dynamique dans le répertoire **/var/log/journal** :
  
 <code> <code>
-root@debian8:~# ls -/run/log/journal/ +root@debian11:~# ls -lR /var/log/journal/ 
-total 0 +/var/log/journal/: 
-drwxr-s--- root systemd-journal 60 Oct 28 14:55 951001cfea0b40279f6ad23a29c19005+total 4 
 +drwxr-sr-x+ 2 root systemd-journal 4096 Apr 25 13:36 6f7e96ef32a74c788166a0f3ad41a5c0 
 + 
 +/var/log/journal/6f7e96ef32a74c788166a0f3ad41a5c0: 
 +total 32780 
 +-rw-r-----+ 1 root systemd-journal 8388608 Apr 25 07:08 system@0005dd7392809037-23351ec76c7140d3.journal~ 
 +-rw-r-----+ 1 root systemd-journal 8388608 Apr 29 15:11 system.journal 
 +-rw-r-----+ 1 root systemd-journal 8388608 Apr 25 13:36 user-1000@0005dd78fd663470-0c9ed794ecc61aa8.journal~ 
 +-rw-r-----+ 1 root systemd-journal 8388608 Apr 29 14:35 user-1000.journal
 </code> </code>
  
-A l'extinction de la machine les journaux sont **effacés**+Journald ne peut pas envoyer les traces à un autre ordinateur. Pour utiliser un serveur de journalisation distant il faut donc décommenter la directive **ForwardToSyslog=yes** dans le fichier de configuration de journald, **/etc/systemd/journald.conf**, puis configurer Rsyslog à envoyer les traces au serveur distant :
- +
-Pour rendre les journaux permenants, il faut créer le répertoire **/var/log/journal** :+
  
 <code> <code>
-root@debian8:~# mkdir /var/log/journal +root@debian11:~# cat /etc/systemd/journald.conf 
-root@debian8:~ls -l /var/log/journal + This file is part of systemd. 
-total 0 +# 
-root@debian8:~systemctl restart systemd-journald + systemd is free software; you can redistribute it and/or modify it 
-root@debian8:~ls -l /var/run/journal + under the terms of the GNU Lesser General Public License as published by 
-ls: cannot access /var/run/journal: No such file or directory +#  the Free Software Foundation; either version 2.1 of the License, or 
-root@debian8:~ls -l /var/log/journal + (at your option) any later version. 
-total 4 +
-drwxr-xr-x 2 root root 4096 Oct 28 15:59 951001cfea0b40279f6ad23a29c19005 +# Entries in this file show the compile time defaults. 
-root@debian8:~ +# You can change settings by editing this file. 
 +# Defaults can be restored by simply deleting this file. 
 +
 +# See journald.conf(5) for details. 
 + 
 +[Journal] 
 +#Storage=auto 
 +#Compress=yes 
 +#Seal=yes 
 +#SplitMode=uid 
 +#SyncIntervalSec=5m 
 +#RateLimitIntervalSec=30s 
 +#RateLimitBurst=10000 
 +#SystemMaxUse= 
 +#SystemKeepFree= 
 +#SystemMaxFileSize= 
 +#SystemMaxFiles=100 
 +#RuntimeMaxUse= 
 +#RuntimeKeepFree= 
 +#RuntimeMaxFileSize= 
 +#RuntimeMaxFiles=100 
 +#MaxRetentionSec= 
 +#MaxFileSec=1month 
 +#ForwardToSyslog=yes 
 +#ForwardToKMsg=no 
 +#ForwardToConsole=no 
 +#ForwardToWall=yes 
 +#TTYPath=/dev/console 
 +#MaxLevelStore=debug 
 +#MaxLevelSyslog=debug 
 +#MaxLevelKMsg=notice 
 +#MaxLevelConsole=info 
 +#MaxLevelWall=emerg 
 +#LineMax=48K 
 +#ReadKMsg=yes 
 +#Audit=no
 </code> </code>
  
-<WRAP center round important> +====5.1 - Consultation des Journaux====
-**Important** : Journald ne peut pas envoyer les traces à un autre ordinateur. Pour utiliser un serveur de journalisation distant il faut donc inclure la directive **ForwardToSyslog=yes** dans le fichier de configuration de journald, **/etc/systemd/journald.conf**, puis configurer Rsyslog à envoyer les traces au serveur distant. +
-</WRAP> +
- +
-====Consultation des Journaux====+
  
 L'utilisation de la commande **journalctl** permet la consultation des journaux : L'utilisation de la commande **journalctl** permet la consultation des journaux :
  
 <code> <code>
-root@debian8:~# journalctl +root@debian11:~# journalctl 
--- Logs begin at Wed 2015-10-28 14:55:29 CETend at Wed 2015-10-28 16:01:01 CET. -- +-- Journal begins at Mon 2022-04-25 07:01:58 CESTends at Fri 2022-04-29 15:06:18 CEST. -- 
-Oct 28 14:55:29 debian8 systemd-journal[147]: Runtime journal is using 4.0M (max allowed 20.1M, trying to leave 30.2M free of 197.3M available → curre +Apr 25 07:01:58 debian11 kernel: Linux version 5.10.0-13-amd64 (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.1-610.2.20210110, GNU ld (GNU Bin> 
-Oct 28 14:55:29 debian8 systemd-journal[147]: Runtime journal is using 4.0M (max allowed 20.1M, trying to leave 30.2M free of 197.3M available → curre +Apr 25 07:01:58 debian11 kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-5.10.0-13-amd64 root=UUID=9887a74f-a680-4bde-8f04-db5ae9ea186e ro quiet 
-Oct 28 14:55:29 debian8 kernel: Initializing cgroup subsys cpuset +Apr 25 07:01:58 debian11 kernel: x86/fpu: x87 FPU will use FXSAVE 
-Oct 28 14:55:29 debian8 kernel: Initializing cgroup subsys cpu +Apr 25 07:01:58 debian11 kernel: BIOS-provided physical RAM map: 
-Oct 28 14:55:29 debian8 kernel: Initializing cgroup subsys cpuacct +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable 
-Oct 28 14:55:29 debian8 kernel: Linux version 3.16.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #SMP Debian 3+Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved 
-Oct 28 14:55:29 debian8 kernel: e820: BIOS-provided physical RAM map: +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000bffd9fff] usable 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x00000000bffda000-0x00000000bfffffffreserved 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x0000000000100000-0x000000003ffeffff] usable +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x000000003fff0000-0x000000003fffffffACPI data +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x0000000100000000-0x000000013fffffff] usable 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved +Apr 25 07:01:58 debian11 kernel: NX (Execute Disable) protection: active 
-Oct 28 14:55:29 debian8 kernel: NX (Execute Disable) protection: active +Apr 25 07:01:58 debian11 kernel: SMBIOS 2.present. 
-Oct 28 14:55:29 debian8 kernel: SMBIOS 2.present. +Apr 25 07:01:58 debian11 kernel: DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 
-Oct 28 14:55:29 debian8 kernel: DMI: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 +Apr 25 07:01:58 debian11 kernel: Hypervisor detected: KVM 
-Oct 28 14:55:29 debian8 kernel: e820: update [mem 0x00000000-0x00000fff] usable ==> reserved +Apr 25 07:01:58 debian11 kernel: kvm-clock: Using msrs 4b564d01 and 4b564d00 
-Oct 28 14:55:29 debian8 kernel: e820: remove [mem 0x000a0000-0x000fffff] usable +Apr 25 07:01:58 debian11 kernel: kvm-clock: cpu 0, msr 86ab8001, primary cpu clock 
-Oct 28 14:55:29 debian8 kernel: e820: last_pfn = 0x3fff0 max_arch_pfn = 0x1000000 +Apr 25 07:01:58 debian11 kernel: kvm-clock: using sched offset of 2324543470279 cycles 
-Oct 28 14:55:29 debian8 kernel: MTRR default type: uncachable +Apr 25 07:01:58 debian11 kernel: clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns 
-Oct 28 14:55:29 debian8 kernel: MTRR variable ranges disabled+Apr 25 07:01:58 debian11 kernel: tsc: Detected 2399.982 MHz processor 
-Oct 28 14:55:29 debian8 kernel: x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106 +Apr 25 07:01:58 debian11 kernel: e820: update [mem 0x00000000-0x00000fff] usable ==> reserved 
-Oct 28 14:55:29 debian8 kernel: CPU MTRRs all blank - virtualized system. +Apr 25 07:01:58 debian11 kernel: e820: remove [mem 0x000a0000-0x000fffff] usable 
-Oct 28 14:55:29 debian8 kernel: initial memory mapped[mem 0x00000000-0x01bfffff] +Apr 25 07:01:58 debian11 kernel: last_pfn = 0x140000 max_arch_pfn = 0x400000000 
-Oct 28 14:55:29 debian8 kernel: Base memory trampoline at [c009b000] 9b000 size 16384 +Apr 25 07:01:58 debian11 kernel: MTRR default type: write-back 
-Oct 28 14:55:29 debian8 kernel: init_memory_mapping: [mem 0x00000000-0x000fffff+Apr 25 07:01:58 debian11 kernel: MTRR fixed ranges enabled
-Oct 28 14:55:29 debian8 kernel:  [mem 0x00000000-0x000fffffpage 4k +Apr 25 07:01:58 debian11 kernel:   00000-9FFFF write-back 
-Oct 28 14:55:29 debian8 kernel: init_memory_mapping: [mem 0x37200000-0x373fffff+Apr 25 07:01:58 debian11 kernel:   A0000-BFFFF uncachable 
-Oct 28 14:55:29 debian8 kernel:  [mem 0x37200000-0x373fffff] page 2M +Apr 25 07:01:58 debian11 kernel:   C0000-FFFFF write-protect 
-Oct 28 14:55:29 debian8 kernel: init_memory_mapping[mem 0x34000000-0x371fffff] +Apr 25 07:01:58 debian11 kernel: MTRR variable ranges enabled: 
-lines 1-31+Apr 25 07:01:58 debian11 kernel:   base 00C0000000 mask FFC0000000 uncachable 
 +Apr 25 07:01:58 debian11 kernel:   1 disabled 
 +Apr 25 07:01:58 debian11 kernel:   2 disabled 
 +Apr 25 07:01:58 debian11 kernel:   3 disabled 
 +Apr 25 07:01:58 debian11 kernel:   4 disabled 
 +Apr 25 07:01:58 debian11 kernel:   5 disabled 
 +Apr 25 07:01:58 debian11 kernel:   6 disabled 
 +Apr 25 07:01:58 debian11 kernel:   7 disabled 
 +Apr 25 07:01:58 debian11 kernel: x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- UC   
 +Apr 25 07:01:58 debian11 kernel: last_pfn = 0xbffda max_arch_pfn = 0x400000000 
 +Apr 25 07:01:58 debian11 kernel: found SMP MP-table at [mem 0x000f5a80-0x000f5a8f
 +Apr 25 07:01:58 debian11 kernel: RAMDISK: [mem 0x3304d000-0x3581dfff
 +Apr 25 07:01:58 debian11 kernel: ACPI: Early table checksum verification disabled 
 +Apr 25 07:01:58 debian11 kernel: ACPI: RSDP 0x00000000000F5880 000014 (v00 BOCHS ) 
 +Apr 25 07:01:58 debian11 kernel: ACPI: RSDT 0x00000000BFFE145E 000038 (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001) 
 +Apr 25 07:01:58 debian11 kernel: ACPIFACP 0x00000000BFFE1240 000074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001) 
 +lines 1-47 
 +[q]
 </code> </code>
  
Ligne 1322: Ligne 1358:
 </WRAP> </WRAP>
  
-===Consultation des Journaux d'une Application Spécifique===+====5.2 - Consultation des Journaux d'une Application Spécifique====
  
 Pour consulter les entrées concernant une application spécifique, il suffit de passer l'exécutable, y compris son chemin complet, en argument à la commande journalctl :  Pour consulter les entrées concernant une application spécifique, il suffit de passer l'exécutable, y compris son chemin complet, en argument à la commande journalctl : 
  
 <code> <code>
-root@debian8:~# journalctl /usr/sbin/anacron +root@debian11:~# journalctl /usr/sbin/anacron 
--- Logs begin at Wed 2015-10-28 14:55:29 CETend at Wed 2015-10-28 16:03:01 CET. -- +-- Journal begins at Mon 2022-04-25 07:01:58 CESTends at Fri 2022-04-29 15:06:18 CEST. -- 
-Oct 28 14:55:36 debian8 anacron[441]: Anacron 2.3 started on 2015-10-28 +Apr 25 07:02:04 debian11 anacron[355]: Anacron 2.3 started on 2022-04-25 
-Oct 28 14:55:36 debian8 anacron[441]: Will run job `cron.daily' in 5 min. +Apr 25 07:02:04 debian11 anacron[355]: Will run job `cron.daily' in 5 min. 
-Oct 28 14:55:36 debian8 anacron[441]: Jobs will be executed sequentially +Apr 25 07:02:04 debian11 anacron[355]: Will run job `cron.weekly' in 10 min. 
-Oct 28 15:00:36 debian8 anacron[441]: Job `cron.daily' started +Apr 25 07:02:04 debian11 anacron[355]: Will run job `cron.monthly' in 15 min. 
-Oct 28 15:00:36 debian8 anacron[972]: Updated timestamp for job `cron.daily' to 2015-10-28+Apr 25 07:02:04 debian11 anacron[355]: Jobs will be executed sequentially 
 +-- Boot 7fdaa15ef0664ecb99118b80b4db4cd9 -- 
 +Apr 25 07:08:53 debian11 anacron[361]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 07:08:53 debian11 anacron[361]: Will run job `cron.daily' in 5 min. 
 +Apr 25 07:08:53 debian11 anacron[361]: Will run job `cron.weekly' in 10 min. 
 +Apr 25 07:08:53 debian11 anacron[361]: Will run job `cron.monthly' in 15 min. 
 +Apr 25 07:08:53 debian11 anacron[361]: Jobs will be executed sequentially 
 +Apr 25 07:13:54 debian11 anacron[361]: Job `cron.daily' started 
 +Apr 25 07:13:54 debian11 anacron[361]: Job `cron.daily' terminated 
 +Apr 25 07:18:53 debian11 anacron[361]: Job `cron.weekly' started 
 +Apr 25 07:18:53 debian11 anacron[629]: Updated timestamp for job `cron.weekly' to 2022-04-25 
 +Apr 25 07:18:53 debian11 anacron[361]: Job `cron.weekly' terminated 
 +Apr 25 07:23:53 debian11 anacron[361]: Job `cron.monthly' started 
 +Apr 25 07:23:53 debian11 anacron[361]: Job `cron.monthly' terminated 
 +Apr 25 07:23:53 debian11 anacron[361]: Normal exit (3 jobs run) 
 +Apr 25 07:34:38 debian11 anacron[649]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 07:34:38 debian11 anacron[649]: Normal exit (0 jobs run) 
 +Apr 25 08:30:38 debian11 anacron[677]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 08:30:38 debian11 anacron[677]: Normal exit (0 jobs run) 
 +Apr 25 09:31:58 debian11 anacron[708]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 09:31:58 debian11 anacron[708]: Normal exit (0 jobs run) 
 +Apr 25 10:32:58 debian11 anacron[739]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 10:32:58 debian11 anacron[739]: Normal exit (0 jobs run) 
 +Apr 25 12:34:38 debian11 anacron[799]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 12:34:38 debian11 anacron[799]: Normal exit (0 jobs run) 
 +Apr 25 13:34:58 debian11 anacron[828]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 13:34:58 debian11 anacron[828]: Normal exit (0 jobs run) 
 +Apr 25 14:33:28 debian11 anacron[8989]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 14:33:28 debian11 anacron[8989]: Normal exit (0 jobs run) 
 +Apr 25 15:30:58 debian11 anacron[9035]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 15:30:58 debian11 anacron[9035]: Normal exit (0 jobs run) 
 +Apr 25 16:33:28 debian11 anacron[9066]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 16:33:28 debian11 anacron[9066]: Normal exit (0 jobs run) 
 +Apr 25 17:32:58 debian11 anacron[9277]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 17:32:58 debian11 anacron[9277]: Normal exit (0 jobs run) 
 +Apr 25 18:34:58 debian11 anacron[9307]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 18:34:58 debian11 anacron[9307]: Normal exit (0 jobs run) 
 +Apr 25 19:32:38 debian11 anacron[9337]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 19:32:38 debian11 anacron[9337]: Normal exit (0 jobs run) 
 +Apr 25 20:32:38 debian11 anacron[9366]: Anacron 2.3 started on 2022-04-25 
 +Apr 25 20:32:38 debian11 anacron[9366]: Normal exit (0 jobs run) 
 +Apr 25 21:34:58 debian11 anacron[9396]: Anacron 2.3 started on 2022-04-25 
 +lines 1-47 
 +[q]
 </code> </code>
  
 <WRAP center round important> <WRAP center round important>
-**Important** : Rappelez-vous que sous RHEL/CentOS 7 le répertoire **/sbin** est un line symbolique vers **/usr/sbin**. Ceci n'est pas le cas sous Debian 8.+**Important** : Rappelez-vous que sous Debian 11 le répertoire **/sbin** est un lien symbolique vers **/usr/sbin**.
 </WRAP> </WRAP>
  
-===Consultation des Journaux depuis le Dernier Démarrage===+====5.3 - Consultation des Journaux depuis le Dernier Démarrage====
  
 Pour consulter les entrées depuis le dernier démarrage, il suffit d'utiliser l'option **-b** de la commande journalctl :  Pour consulter les entrées depuis le dernier démarrage, il suffit d'utiliser l'option **-b** de la commande journalctl : 
  
 <code> <code>
-root@debian8:~# journalctl -b | more +root@debian11:/# journalctl -b | more 
--- Logs begin at Wed 2015-10-28 14:55:29 CETend at Wed 2015-10-28 16:06:01 CET. -- +-- Journal begins at Mon 2022-04-25 07:01:58 CESTends at Fri 2022-04-29 15:17:01 CEST. -- 
-Oct 28 14:55:29 debian8 systemd-journal[147]: Runtime journal is using 4.0M (max allowed 20.1M, trying to leave 30.2M free of 197.3M available → curre +Apr 26 13:08:18 debian11 kernel: Linux version 5.10.0-13-amd64 (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.1-6) 10.2.20210110, GNU ld (GNU Binu 
-nt limit 20.1M). +tils for Debian2.35.2) #1 SMP Debian 5.10.106-1 (2022-03-17
-Oct 28 14:55:29 debian8 systemd-journal[147]: Runtime journal is using 4.0M (max allowed 20.1M, trying to leave 30.2M free of 197.3M available → curre +Apr 26 13:08:18 debian11 kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-5.10.0-13-amd64 root=UUID=9887a74f-a680-4bde-8f04-db5ae9ea186e ro quiet 
-nt limit 20.1M). +Apr 26 13:08:18 debian11 kernel: x86/fpu: x87 FPU will use FXSAVE 
-Oct 28 14:55:29 debian8 kernel: Initializing cgroup subsys cpuset +Apr 26 13:08:18 debian11 kernel: BIOS-provided physical RAM map: 
-Oct 28 14:55:29 debian8 kernel: Initializing cgroup subsys cpu +Apr 26 13:08:18 debian11 kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable 
-Oct 28 14:55:29 debian8 kernel: Initializing cgroup subsys cpuacct +Apr 26 13:08:18 debian11 kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved 
-Oct 28 14:55:29 debian8 kernel: Linux version 3.16.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3. +Apr 26 13:08:18 debian11 kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved 
-16.7-ckt11-1+deb8u5 (2015-10-09+Apr 26 13:08:18 debian11 kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000bffd9fff] usable 
-Oct 28 14:55:29 debian8 kernel: e820: BIOS-provided physical RAM map: +Apr 26 13:08:18 debian11 kernel: BIOS-e820: [mem 0x00000000bffda000-0x00000000bfffffffreserved 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable +Apr 26 13:08:18 debian11 kernel: BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved +Apr 26 13:08:18 debian11 kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved +Apr 26 13:08:18 debian11 kernel: BIOS-e820: [mem 0x0000000100000000-0x000000013fffffff] usable 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x0000000000100000-0x000000003ffeffff] usable +Apr 26 13:08:18 debian11 kernel: NX (Execute Disable) protection: active 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x000000003fff0000-0x000000003fffffffACPI data +Apr 26 13:08:18 debian11 kernel: SMBIOS 2.present. 
-Oct 28 14:55:29 debian8 kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved +Apr 26 13:08:18 debian11 kernel: DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 
-Oct 28 14:55:29 debian8 kernel: NX (Execute Disable) protection: active +Apr 26 13:08:18 debian11 kernel: Hypervisor detected: KVM 
-Oct 28 14:55:29 debian8 kernel: SMBIOS 2.present. +Apr 26 13:08:18 debian11 kernel: kvm-clock: Using msrs 4b564d01 and 4b564d00 
-Oct 28 14:55:29 debian8 kernel: DMI: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 +Apr 26 13:08:18 debian11 kernel: kvm-clock: cpu 0, msr 5ccb8001, primary cpu clock 
-Oct 28 14:55:29 debian8 kernel: e820: update [mem 0x00000000-0x00000fff] usable ==> reserved +Apr 26 13:08:18 debian11 kernel: kvm-clock: using sched offset of 10164710878 cycles 
-Oct 28 14:55:29 debian8 kernel: e820: remove [mem 0x000a0000-0x000fffff] usable +Apr 26 13:08:18 debian11 kernel: clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns 
-Oct 28 14:55:29 debian8 kernel: e820: last_pfn = 0x3fff0 max_arch_pfn = 0x1000000 +Apr 26 13:08:18 debian11 kernel: tsc: Detected 2399.982 MHz processor 
-Oct 28 14:55:29 debian8 kernel: MTRR default type: uncachable +Apr 26 13:08:18 debian11 kernel: e820: update [mem 0x00000000-0x00000fff] usable ==> reserved 
-Oct 28 14:55:29 debian8 kernel: MTRR variable ranges disabled: +Apr 26 13:08:18 debian11 kernel: e820: remove [mem 0x000a0000-0x000fffff] usable 
-Oct 28 14:55:29 debian8 kernel: x86 PAT enabledcpu 0, old 0x7040600070406, new 0x7010600070106 +Apr 26 13:08:18 debian11 kernel: last_pfn = 0x140000 max_arch_pfn = 0x400000000 
-Oct 28 14:55:29 debian8 kernel: CPU MTRRs all blank - virtualized system. +Apr 26 13:08:18 debian11 kernel: MTRR default type: write-back 
-Oct 28 14:55:29 debian8 kernel: initial memory mapped: [mem 0x00000000-0x01bfffff+Apr 26 13:08:18 debian11 kernel: MTRR fixed ranges enabled: 
-Oct 28 14:55:29 debian8 kernel: Base memory trampoline at [c009b0009b000 size 16384 +Apr 26 13:08:18 debian11 kernel:   00000-9FFFF write-back 
-Oct 28 14:55:29 debian8 kernel: init_memory_mapping: [mem 0x00000000-0x000fffff+Apr 26 13:08:18 debian11 kernel:   A0000-BFFFF uncachable 
-Oct 28 14:55:29 debian8 kernel:  [mem 0x00000000-0x000fffff] page 4k+Apr 26 13:08:18 debian11 kernel:   C0000-FFFFF write-protect 
 +Apr 26 13:08:18 debian11 kernel: MTRR variable ranges enabled: 
 +Apr 26 13:08:18 debian11 kernel:   0 base 00C0000000 mask FFC0000000 uncachable 
 +Apr 26 13:08:18 debian11 kernel:   disabled 
 +Apr 26 13:08:18 debian11 kernel:   2 disabled 
 +Apr 26 13:08:18 debian11 kernel:   3 disabled 
 +Apr 26 13:08:18 debian11 kernel:   4 disabled 
 +Apr 26 13:08:18 debian11 kernel:   5 disabled 
 +Apr 26 13:08:18 debian11 kernel:   6 disabled 
 +Apr 26 13:08:18 debian11 kernel:   7 disabled 
 +Apr 26 13:08:18 debian11 kernel: x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- UC   
 +Apr 26 13:08:18 debian11 kernel: last_pfn = 0xbffda max_arch_pfn = 0x400000000 
 +Apr 26 13:08:18 debian11 kernel: found SMP MP-table at [mem 0x000f5a80-0x000f5a8f
 +Apr 26 13:08:18 debian11 kernel: RAMDISK: [mem 0x3304d000-0x3581dfff
 +Apr 26 13:08:18 debian11 kernel: ACPI: Early table checksum verification disabled 
 +Apr 26 13:08:18 debian11 kernel: ACPI: RSDP 0x00000000000F5880 000014 (v00 BOCHS ) 
 +Apr 26 13:08:18 debian11 kernel: ACPI: RSDT 0x00000000BFFE145E 000038 (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001)
 --More-- --More--
 +[q]
 </code> </code>
  
-<WRAP center round important> +Notez que vous pouvez consulter les messages depuis les démarrages précédents, il est possible d'utiliser les options **-b 1**, **-b 2** etc. 
-**Important** : Notez que vous pouvez consulter les messages des démarrages précédents, il est possible d'utiliser les options **-b 1**, **-b 2** etc. + 
-</WRAP>+<code> 
 +root@debian11:/# journalctl -b 1 | more 
 +-- Journal begins at Mon 2022-04-25 07:01:58 CEST, ends at Fri 2022-04-29 15:17:01 CEST. -- 
 +Apr 25 07:01:58 debian11 kernel: Linux version 5.10.0-13-amd64 (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binu 
 +tils for Debian) 2.35.2) #1 SMP Debian 5.10.106-1 (2022-03-17) 
 +Apr 25 07:01:58 debian11 kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-5.10.0-13-amd64 root=UUID=9887a74f-a680-4bde-8f04-db5ae9ea186e ro quiet 
 +Apr 25 07:01:58 debian11 kernel: x86/fpu: x87 FPU will use FXSAVE 
 +Apr 25 07:01:58 debian11 kernel: BIOS-provided physical RAM map: 
 +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable 
 +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved 
 +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved 
 +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000bffd9fff] usable 
 +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x00000000bffda000-0x00000000bfffffff] reserved 
 +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved 
 +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved 
 +Apr 25 07:01:58 debian11 kernel: BIOS-e820: [mem 0x0000000100000000-0x000000013fffffff] usable 
 +Apr 25 07:01:58 debian11 kernel: NX (Execute Disable) protection: active 
 +Apr 25 07:01:58 debian11 kernel: SMBIOS 2.8 present. 
 +Apr 25 07:01:58 debian11 kernel: DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 
 +Apr 25 07:01:58 debian11 kernel: Hypervisor detected: KVM 
 +Apr 25 07:01:58 debian11 kernel: kvm-clock: Using msrs 4b564d01 and 4b564d00 
 +Apr 25 07:01:58 debian11 kernel: kvm-clock: cpu 0, msr 86ab8001, primary cpu clock 
 +Apr 25 07:01:58 debian11 kernel: kvm-clock: using sched offset of 2324543470279 cycles 
 +Apr 25 07:01:58 debian11 kernel: clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns 
 +Apr 25 07:01:58 debian11 kernel: tsc: Detected 2399.982 MHz processor 
 +Apr 25 07:01:58 debian11 kernel: e820: update [mem 0x00000000-0x00000fff] usable ==> reserved 
 +Apr 25 07:01:58 debian11 kernel: e820: remove [mem 0x000a0000-0x000fffff] usable 
 +Apr 25 07:01:58 debian11 kernel: last_pfn = 0x140000 max_arch_pfn = 0x400000000 
 +Apr 25 07:01:58 debian11 kernel: MTRR default type: write-back 
 +Apr 25 07:01:58 debian11 kernel: MTRR fixed ranges enabled: 
 +Apr 25 07:01:58 debian11 kernel:   00000-9FFFF write-back 
 +Apr 25 07:01:58 debian11 kernel:   A0000-BFFFF uncachable 
 +Apr 25 07:01:58 debian11 kernel:   C0000-FFFFF write-protect 
 +Apr 25 07:01:58 debian11 kernel: MTRR variable ranges enabled: 
 +Apr 25 07:01:58 debian11 kernel:   0 base 00C0000000 mask FFC0000000 uncachable 
 +Apr 25 07:01:58 debian11 kernel:   1 disabled 
 +Apr 25 07:01:58 debian11 kernel:   2 disabled 
 +Apr 25 07:01:58 debian11 kernel:   3 disabled 
 +Apr 25 07:01:58 debian11 kernel:   4 disabled 
 +Apr 25 07:01:58 debian11 kernel:   5 disabled 
 +Apr 25 07:01:58 debian11 kernel:   6 disabled 
 +Apr 25 07:01:58 debian11 kernel:   7 disabled 
 +Apr 25 07:01:58 debian11 kernel: x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- UC   
 +Apr 25 07:01:58 debian11 kernel: last_pfn = 0xbffda max_arch_pfn = 0x400000000q] 
 +Apr 25 07:01:58 debian11 kernel: found SMP MP-table at [mem 0x000f5a80-0x000f5a8f] 
 +Apr 25 07:01:58 debian11 kernel: RAMDISK: [mem 0x3304d000-0x3581dfff] 
 +Apr 25 07:01:58 debian11 kernel: ACPI: Early table checksum verification disabled 
 +Apr 25 07:01:58 debian11 kernel: ACPI: RSDP 0x00000000000F5880 000014 (v00 BOCHS ) 
 +Apr 25 07:01:58 debian11 kernel: ACPI: RSDT 0x00000000BFFE145E 000038 (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001) 
 +--More-- 
 +[q] 
 +</code>
  
-===Consultation des Journaux d'une Priorité Spécifique===+====5.4 - Consultation des Journaux d'une Priorité Spécifique====
  
 Pour consulter les entrées à partir d'une priorité spécifique et supérieur, il suffit d'utiliser l'option **-p** de la commande journalctl en spécifiant la priorité concernée :  Pour consulter les entrées à partir d'une priorité spécifique et supérieur, il suffit d'utiliser l'option **-p** de la commande journalctl en spécifiant la priorité concernée : 
  
 <code> <code>
-root@debian8:~# journalctl -p warning +root@debian11:/# journalctl -p warning 
--- Logs begin at Wed 2015-10-28 14:55:29 CETend at Wed 2015-10-28 16:07:01 CET. -- +-- Journal begins at Mon 2022-04-25 07:01:58 CESTends at Fri 2022-04-29 15:17:01 CEST. -- 
-Oct 28 14:55:29 debian8 kernel: ACPIRSDP 0x000E0000 000024 (v02 VBOX  ) +Apr 25 07:01:58 debian11 kernel: acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. 
-Oct 28 14:55:29 debian8 kernel: ACPIXSDT 0x3FFF0030 000034 (v01 VBOX   VBOXXSDT 00000001 ASL  00000061) +Apr 25 07:01:58 debian11 kernel: sd 2:0:0:0: Power-on or device reset occurred 
-Oct 28 14:55:29 debian8 kernelACPIFACP 0x3FFF00F0 0000F4 (v04 VBOX   VBOXFACP 00000001 ASL  00000061) +Apr 25 07:01:58 debian11 systemd[1]/lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables s> 
-Oct 28 14:55:29 debian8 kernelACPIDSDT 0x3FFF0410 001BF1 (v01 VBOX   VBOXBIOS 00000002 INTL 20100528) +Apr 25 07:02:05 debian11 udisksd[368]failed to load module mdraidlibbd_mdraid.so.2cannot open shared object fileNo such file or directory 
-Oct 28 14:55:29 debian8 kernelACPIFACS 0x3FFF0200 000040 +Apr 25 07:02:05 debian11 udisksd[368]: Failed to load the 'mdraid' libblockdev plugin 
-Oct 28 14:55:29 debian8 kernelACPISSDT 0x3FFF0240 0001CC (v01 VBOX   VBOXCPUT 00000002 INTL 20100528) +Apr 25 07:02:05 debian11 lightdm[408]Could not enumerate user data directory /var/lib/lightdm/dataError opening directory '/var/lib/lightdm/data': No > 
-Oct 28 14:55:29 debian8 kernelZone ranges+Apr 25 07:02:05 debian11 NetworkManager[359]<warn>  [1650862925.6861] ifupdowninterfaces file /etc/network/interfaces.d/* doesn't exist 
-Oct 28 14:55:29 debian8 kernel  DMA      [mem 0x00001000-0x00ffffff+Apr 25 07:02:08 debian11 lightdm[485]Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The n> 
-Oct 28 14:55:29 debian8 kernel  Normal   [mem 0x01000000-0x375fdfff+Apr 25 07:02:08 debian11 lightdm[408]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The n> 
-Oct 28 14:55:29 debian8 kernel  HighMem  [mem 0x375fe000-0x3ffeffff+Apr 25 07:02:09 debian11 pulseaudio[505]Failed to open cookie file '/var/lib/lightdm/.config/pulse/cookie': No such file or directory 
-Oct 28 14:55:29 debian8 kernelMovable zone start for each node +Apr 25 07:02:09 debian11 pulseaudio[505]: Failed to load authentication key '/var/lib/lightdm/.config/pulse/cookie': No such file or directory 
-Oct 28 14:55:29 debian8 kernelEarly memory node ranges +Apr 25 07:02:09 debian11 pulseaudio[505]Failed to open cookie file '/var/lib/lightdm/.pulse-cookie': No such file or directory 
-Oct 28 14:55:29 debian8 kernel  node   0: [mem 0x00001000-0x0009efff+Apr 25 07:02:09 debian11 pulseaudio[505]: Failed to load authentication key '/var/lib/lightdm/.pulse-cookie': No such file or directory 
-Oct 28 14:55:29 debian8 kernel  node   0: [mem 0x00100000-0x3ffeffff+Apr 25 07:02:09 debian11 pipewire[504]: Failed to receive portal pid: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get PID of name 'org.freedeskto> 
-Oct 28 14:55:29 debian8 kernelBuilt 1 zonelists in Zone order, mobility grouping on Total pages260258 +Apr 25 07:03:23 debian11 lightdm[554]gkr-pam: unable to locate daemon control file 
-Oct 28 14:55:29 debian8 kernelMemory1010236K/1048120K available (4599K kernel code518K rwdata, 1448K rodata, 656K init, 460K bss, 37884K reserve +Apr 25 07:03:23 debian11 lightdm[554]Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The n> 
-Oct 28 14:55:29 debian8 kernelFast TSC calibration using MSR failed +Apr 25 07:03:23 debian11 lightdm[408]g_dbus_connection_call_sync_internalassertion 'G_IS_DBUS_CONNECTION (connection)' failed 
-Oct 28 14:55:29 debian8 kerneltscUnable to calibrate against PIT +Apr 25 07:03:23 debian11 pipewire[574]: Failed to receive portal pid: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get PID of name 'org.freedeskto> 
-Oct 28 14:55:29 debian8 kernel: ACPIAll ACPI Tables successfully acquired +Apr 25 07:03:23 debian11 pulseaudio[575]Failed to open cookie file '/home/trainee/.config/pulse/cookie'No such file or directory 
-Oct 28 14:55:29 debian8 kernel: ACPIsetting ELCR to 0200 (from 0e00) +Apr 25 07:03:23 debian11 pulseaudio[575]: Failed to load authentication key '/home/trainee/.config/pulse/cookie': No such file or directory 
-Oct 28 14:55:29 debian8 kernelsmpbootweirdboot CPU (#0) not listed by the BIOS +Apr 25 07:03:23 debian11 pulseaudio[575]Failed to open cookie file '/home/trainee/.pulse-cookie'No such file or directory 
-Oct 28 14:55:29 debian8 kernelNMI watchdogdisabled (cpu0)hardware events not enabled +Apr 25 07:03:23 debian11 pulseaudio[575]Failed to load authentication key '/home/trainee/.pulse-cookie': No such file or directory 
-Oct 28 14:55:29 debian8 kernelACPIExecuted 1 blocks of module-level executable AML code +Apr 25 07:04:38 debian11 systemd[1]: /lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafeas it disables s> 
-Oct 28 14:55:29 debian8 kernelACPI ExceptionAE_NOT_FOUND, While evaluating Sleep State [\_S1_(20140424/hwxface-580) +Apr 25 07:04:38 debian11 systemd[1]/lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables s> 
-Oct 28 14:55:29 debian8 kernelACPI ExceptionAE_NOT_FOUND, While evaluating Sleep State [\_S2_(20140424/hwxface-580) +Apr 25 07:04:38 debian11 systemd[1]/lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables s> 
-Oct 28 14:55:29 debian8 kernelACPI ExceptionAE_NOT_FOUND, While evaluating Sleep State [\_S3_(20140424/hwxface-580) +-- Boot 7fdaa15ef0664ecb99118b80b4db4cd9 -- 
-Oct 28 14:55:29 debian8 kernelACPI ExceptionAE_NOT_FOUND, While evaluating Sleep State [\_S4_(20140424/hwxface-580+Apr 25 07:08:52 debian11 kernel: acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. 
-Oct 28 14:55:29 debian8 kernel: acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. +Apr 25 07:08:52 debian11 kernel: sd 2:0:0:0: Power-on or device reset occurred 
-Oct 28 14:55:29 debian8 kernel: ACPIEnabled GPEs in block 00 to 07 +Apr 25 07:08:52 debian11 systemd[1]/lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafeas it disables s> 
-Oct 28 14:55:29 debian8 kernel: ACPIPCI Interrupt Link [LNKB] enabled at IRQ 11 +Apr 25 07:08:54 debian11 udisksd[388]failed to load module mdraidlibbd_mdraid.so.2cannot open shared object file: No such file or directory 
-lines 1-31+Apr 25 07:08:54 debian11 lightdm[413]Error getting user list from org.freedesktop.AccountsGDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The n> 
 +Apr 25 07:08:54 debian11 udisksd[388]Failed to load the 'mdraid' libblockdev plugin 
 +Apr 25 07:08:54 debian11 NetworkManager[382]: <warn>  [1650863334.4876] ifupdown: interfaces file /etc/network/interfaces.d/* doesn't exist 
 +Apr 25 07:08:57 debian11 lightdm[491]Error getting user list from org.freedesktop.AccountsGDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The n> 
 +Apr 25 07:08:58 debian11 pipewire[510]: Failed to receive portal pid: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get PID of name 'org.freedeskto> 
 +Apr 25 13:36:40 debian11 pipewire[850]: could not set nice-level to -11: Permission denied 
 +Apr 25 13:36:40 debian11 pipewire[850]could not make thread realtimePermission denied 
 +Apr 25 13:36:40 debian11 pipewire[850]: Failed to receive portal pid: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get PID of name 'org.freedeskto> 
 +Apr 25 13:36:40 debian11 pipewire-media-session[856]: could not set nice-level to -11: Permission denied 
 +Apr 25 13:36:40 debian11 pipewire-media-session[856]could not make thread realtimePermission denied 
 +Apr 25 17:18:37 debian11 pipewire-media-session[856]: error id:0 seq:158 res:-32 (Broken pipe): connection error 
 +-- Boot 7644749265b24b9a8f6a8695c083cfaa -- 
 +Apr 26 13:08:18 debian11 kernel: acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. 
 +Apr 26 13:08:18 debian11 kernel: sd 2:0:0:2: Power-on or device reset occurred 
 +Apr 26 13:08:18 debian11 kernel: sd 2:0:0:1: Power-on or device reset occurred 
 +Apr 26 13:08:18 debian11 kernel: sd 2:0:0:0: Power-on or device reset occurred 
 +lines 1-47 
 +[q]q
 </code> </code>
  
-===Consultation des Journaux d'une Plage de Dates ou d'Heures===+====5.5 - Consultation des Journaux d'une Plage de Dates ou d'Heures====
  
 Pour consulter les entrées d'une plage de dates ou d'heures, il suffit de passer cette plage en argument à la commande journalctl :  Pour consulter les entrées d'une plage de dates ou d'heures, il suffit de passer cette plage en argument à la commande journalctl : 
  
 <code> <code>
-root@debian8:~# journalctl --since 16:00 --until now +root@debian11:/# date 
--- Logs begin at Wed 2015-10-28 14:55:29 CETend at Wed 2015-10-28 16:08:01 CET. -- +Fri 29 Apr 2022 03:22:00 PM CEST 
-Oct 28 16:00:01 debian8 CRON[1856]: pam_unix(cron:session): session opened for user trainee by (uid=0) +root@debian11:/# journalctl --since 15:00 --until now 
-Oct 28 16:00:01 debian8 CRON[1857]: (trainee) CMD (/bin/pwd > pwd.txt) +-- Journal begins at Mon 2022-04-25 07:01:58 CESTends at Fri 2022-04-29 15:17:01 CEST. -- 
-Oct 28 16:00:01 debian8 CRON[1856]: pam_unix(cron:session): session closed for user trainee +Apr 29 15:06:18 debian11 trainee[45937]: Linux est super 
-Oct 28 16:01:01 debian8 CRON[1861]: pam_unix(cron:session): session opened for user trainee by (uid=0+Apr 29 15:17:01 debian11 audit[45961]: USER_ACCT pid=45961 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:accounting grantors=pam_permi
-Oct 28 16:01:01 debian8 CRON[1862]: (trainee) CMD (/bin/pwd pwd.txt) +Apr 29 15:17:01 debian11 audit[45961]: CRED_ACQ pid=45961 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:setcred grantors=pam_permit,pa
-Oct 28 16:01:01 debian8 CRON[1861]: pam_unix(cron:session): session closed for user trainee +Apr 29 15:17:01 debian11 audit[45961]: USER_START pid=45961 uid=0 auid=0 ses=145 subj==unconfined msg='op=PAM:session_open grantors=pam_loginuid,pam_env,p
-Oct 28 16:02:01 debian8 CRON[1870]: pam_unix(cron:session): session opened for user trainee by (uid=0+Apr 29 15:17:01 debian11 audit[45961]: CRED_DISP pid=45961 uid=0 auid=0 ses=145 subj==unconfined msg='op=PAM:setcred grantors=pam_permit,pam_ecryptfs acct
-Oct 28 16:02:01 debian8 CRON[1871]: (trainee) CMD (/bin/pwd pwd.txt) +Apr 29 15:17:01 debian11 audit[45961]: USER_END pid=45961 uid=0 auid=0 ses=145 subj==unconfined msg='op=PAM:session_close grantors=pam_loginuid,pam_env,pa
-Oct 28 16:02:01 debian8 CRON[1870]: pam_unix(cron:session): session closed for user trainee +Apr 29 15:17:01 debian11 CRON[45961]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0) 
-Oct 28 16:03:01 debian8 CRON[1877]: pam_unix(cron:session): session opened for user trainee by (uid=0+Apr 29 15:17:01 debian11 CRON[45962]: (root) CMD (   cd && run-parts --report /etc/cron.hourly
-Oct 28 16:03:01 debian8 CRON[1878]: (trainee) CMD (/bin/pwd pwd.txt) +Apr 29 15:17:01 debian11 CRON[45961]: pam_unix(cron:session): session closed for user root 
-Oct 28 16:03:01 debian8 CRON[1877]: pam_unix(cron:session): session closed for user trainee +lines 1-10/10 (END
-Oct 28 16:04:01 debian8 CRON[1885]: pam_unix(cron:session): session opened for user trainee by (uid=0+[q]
-Oct 28 16:04:01 debian8 CRON[1886]: (trainee) CMD (/bin/pwd pwd.txt) +
-Oct 28 16:04:01 debian8 CRON[1885]: pam_unix(cron:session): session closed for user trainee +
-Oct 28 16:05:01 debian8 CRON[1888]: pam_unix(cron:session): session opened for user trainee by (uid=0+
-Oct 28 16:05:01 debian8 CRON[1889]: (trainee) CMD (/bin/pwd pwd.txt) +
-Oct 28 16:05:01 debian8 CRON[1888]: pam_unix(cron:session): session closed for user trainee +
-Oct 28 16:06:01 debian8 CRON[1893]: pam_unix(cron:session): session opened for user trainee by (uid=0) +
-Oct 28 16:06:01 debian8 CRON[1894]: (trainee) CMD (/bin/pwd > pwd.txt) +
-Oct 28 16:06:01 debian8 CRON[1893]: pam_unix(cron:session): session closed for user trainee +
-Oct 28 16:07:01 debian8 CRON[1899]: pam_unix(cron:session): session opened for user trainee by (uid=0) +
-Oct 28 16:07:01 debian8 CRON[1900]: (trainee) CMD (/bin/pwd > pwd.txt+
-Oct 28 16:07:01 debian8 CRON[1899]: pam_unix(cron:session): session closed for user trainee +
-Oct 28 16:08:01 debian8 CRON[1909]: pam_unix(cron:session): session opened for user trainee by (uid=0+
-Oct 28 16:08:01 debian8 CRON[1910]: (trainee) CMD (/bin/pwd > pwd.txt) +
-Oct 28 16:08:01 debian8 CRON[1909]: pam_unix(cron:session): session closed for user trainee+
 </code> </code>
  
 <WRAP center round important> <WRAP center round important>
-**Important** : Le format de la date est **2015-09-29 18:38:00**. Il est possible d'utiliser des mots clefs : **yesterday**, **today**, **tomorrow**, **now**.+**Important** : Il est possible d'utiliser des mots clefs : **yesterday**, **today**, **tomorrow**, **now**.
 </WRAP> </WRAP>
  
-===Consultation des Journaux en Live===+====5.6 - Consultation des Journaux en Live====
  
 Pour consulter les journaux en live, il suffit d'utiliser l'option **-f** de la commande journalctl :  Pour consulter les journaux en live, il suffit d'utiliser l'option **-f** de la commande journalctl : 
  
 <code> <code>
-root@debian8:~# journalctl -f +root@debian11:/# journalctl -f 
--- Logs begin at Wed 2015-10-28 14:55:29 CET. -- +-- Journal begins at Mon 2022-04-25 07:01:58 CEST. -- 
-Oct 28 16:06:01 debian8 CRON[1893]: pam_unix(cron:session)session closed for user trainee +Apr 29 14:38:42 debian11 systemd[1]: Started Updates mlocate database every day. 
-Oct 28 16:07:01 debian8 CRON[1899]: pam_unix(cron:session): session opened for user trainee by (uid=0) +Apr 29 15:06:18 debian11 trainee[45937]: Linux est super 
-Oct 28 16:07:01 debian8 CRON[1900]: (trainee) CMD (/bin/pwd > pwd.txt) +Apr 29 15:17:01 debian11 audit[45961]: USER_ACCT pid=45961 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:accounting grantors=pam_permit acct="root" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' 
-Oct 28 16:07:01 debian8 CRON[1899]: pam_unix(cron:session): session closed for user trainee +Apr 29 15:17:01 debian11 audit[45961]: CRED_ACQ pid=45961 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:setcred grantors=pam_permit,pam_ecryptfs acct="root" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' 
-Oct 28 16:08:01 debian8 CRON[1909]: pam_unix(cron:session): session opened for user trainee by (uid=0+Apr 29 15:17:01 debian11 audit[45961]: USER_START pid=45961 uid=0 auid=0 ses=145 subj==unconfined msg='op=PAM:session_open grantors=pam_loginuid,pam_env,pam_env,pam_permit,pam_unix,pam_ecryptfs,pam_limits acct="root" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' 
-Oct 28 16:08:01 debian8 CRON[1910]: (trainee) CMD (/bin/pwd > pwd.txt) +Apr 29 15:17:01 debian11 audit[45961]: CRED_DISP pid=45961 uid=0 auid=0 ses=145 subj==unconfined msg='op=PAM:setcred grantors=pam_permit,pam_ecryptfs acct="root" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' 
-Oct 28 16:08:01 debian8 CRON[1909]: pam_unix(cron:session): session closed for user trainee +Apr 29 15:17:01 debian11 audit[45961]: USER_END pid=45961 uid=0 auid=0 ses=145 subj==unconfined msg='op=PAM:session_close grantors=pam_loginuid,pam_env,pam_env,pam_permit,pam_unix,pam_ecryptfs,pam_limits acct="root" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success' 
-Oct 28 16:09:01 debian8 CRON[1914]: pam_unix(cron:session): session opened for user trainee by (uid=0) +Apr 29 15:17:01 debian11 CRON[45961]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0) 
-Oct 28 16:09:01 debian8 CRON[1915]: (trainee) CMD (/bin/pwd > pwd.txt+Apr 29 15:17:01 debian11 CRON[45962]: (root) CMD (   cd && run-parts --report /etc/cron.hourly
-Oct 28 16:09:01 debian8 CRON[1914]: pam_unix(cron:session): session closed for user trainee +Apr 29 15:17:01 debian11 CRON[45961]: pam_unix(cron:session): session closed for user root 
 +^C
 </code> </code>
  
-Ouvrez un deuxième terminal et saisissez la commande suivante : 
- 
-<code> 
-root@debian8:~# logger -p user.info Linux est super 
-</code> 
- 
-Retournez consulter le premier terminal : 
- 
-<code> 
-root@debian8:~# journalctl -f 
--- Logs begin at Wed 2015-10-28 14:55:29 CET. -- 
-Oct 28 16:06:01 debian8 CRON[1893]: pam_unix(cron:session): session closed for user trainee 
-Oct 28 16:07:01 debian8 CRON[1899]: pam_unix(cron:session): session opened for user trainee by (uid=0) 
-Oct 28 16:07:01 debian8 CRON[1900]: (trainee) CMD (/bin/pwd > pwd.txt) 
-Oct 28 16:07:01 debian8 CRON[1899]: pam_unix(cron:session): session closed for user trainee 
-Oct 28 16:08:01 debian8 CRON[1909]: pam_unix(cron:session): session opened for user trainee by (uid=0) 
-Oct 28 16:08:01 debian8 CRON[1910]: (trainee) CMD (/bin/pwd > pwd.txt) 
-Oct 28 16:08:01 debian8 CRON[1909]: pam_unix(cron:session): session closed for user trainee 
-Oct 28 16:09:01 debian8 CRON[1914]: pam_unix(cron:session): session opened for user trainee by (uid=0) 
-Oct 28 16:09:01 debian8 CRON[1915]: (trainee) CMD (/bin/pwd > pwd.txt) 
-Oct 28 16:09:01 debian8 CRON[1914]: pam_unix(cron:session): session closed for user trainee 
-Oct 28 16:10:01 debian8 CRON[1922]: pam_unix(cron:session): session opened for user trainee by (uid=0) 
-Oct 28 16:10:01 debian8 CRON[1923]: (trainee) CMD (/bin/pwd > pwd.txt) 
-Oct 28 16:10:01 debian8 CRON[1922]: pam_unix(cron:session): session closed for user trainee 
-Oct 28 16:11:01 debian8 CRON[1927]: pam_unix(cron:session): session opened for user trainee by (uid=0) 
-Oct 28 16:11:01 debian8 CRON[1928]: (trainee) CMD (/bin/pwd > pwd.txt) 
-Oct 28 16:11:01 debian8 CRON[1927]: pam_unix(cron:session): session closed for user trainee 
-Oct 28 16:11:20 debian8 trainee[1936]: Linux est super 
- 
- 
-</code> 
- 
-<WRAP center round important> 
-**Important** : Notez la présence de la dernière ligne.  
-</WRAP> 
- 
-===Consultation des Journaux avec des Mots Clefs=== 
- 
-Pour consulter les mots clefs compris par Journald, tapez la commande journalctl puis appuyer trois fois sur la touche <key>Tab</key> : 
- 
-<code> 
-root@debian8:~# journalctl [tab] [tab] [tab] 
-_AUDIT_LOGINUID=             COREDUMP_EXE=                _MACHINE_ID=                 _SOURCE_REALTIME_TIMESTAMP=  _TRANSPORT= 
-_AUDIT_SESSION=              __CURSOR=                    MESSAGE=                     SYSLOG_FACILITY=             _UDEV_DEVLINK= 
-_BOOT_ID=                    ERRNO=                       MESSAGE_ID=                  SYSLOG_IDENTIFIER=           _UDEV_DEVNODE= 
-_CMDLINE=                    _EXE=                        __MONOTONIC_TIMESTAMP=       SYSLOG_PID=                  _UDEV_SYSNAME= 
-CODE_FILE=                   _GID=                        _PID=                        _SYSTEMD_CGROUP=             _UID= 
-CODE_FUNC=                   _HOSTNAME=                   PRIORITY=                    _SYSTEMD_OWNER_UID=           
-CODE_LINE=                   _KERNEL_DEVICE=              __REALTIME_TIMESTAMP=        _SYSTEMD_SESSION=             
-_COMM=                       _KERNEL_SUBSYSTEM=           _SELINUX_CONTEXT=            _SYSTEMD_UNIT=   
-</code> 
- 
-Pour voir la liste des processus dont les traces sont inclus dans les journaux du mots clefs, tapez la commande journalctl suivi par le nom d'un mot clef puis appuyer deux fois sur la touche <key>Tab</key> : 
- 
-<code> 
-root@debian8:~# journalctl journalctl _UID= 
-0     1000  104   106   111   116   120    
-root@debian8:~# journalctl journalctl _COMM= 
-accounts-daemon  cinnamon-screen  exim4            logger           nfs-common       rtkit-daemon     systemd          vboxadd 
-anacron          colord           gdomap           minissdpd        nm-dispatcher    saned            (systemd)        vmtoolsd 
-audispd          console-setup    irqbalance       ModemManager     polkitd          sm-notify        systemd-journal   
-auditctl         cron             kbd              mtp-probe        pulseaudio       speech-dispatch  systemd-logind    
-auditd           dbus-daemon      keyboard-setup   networking       rpcbind          sshd             systemd-modules   
-avahi-daemon     dhclient         lightdm          NetworkManager   rpc.statd        su               udisksd           
-root@debian8:~# journalctl journalctl _COMM=     
-</code> 
- 
------ 
-<html> 
-<div align="center"> 
-Copyright © 2020 Hugh Norris.<br><br> 
-</div> 
-</html> 
 ----- -----
 +Copyright © 2024 Hugh Norris.
Menu