Différences

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

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
elearning:workbooks:redhat:rh124:l105 [2024/09/25 08:09] adminelearning:workbooks:redhat:rh124:l105 [2024/10/08 09:03] (Version actuelle) admin
Ligne 53: Ligne 53:
   * **/etc/group**.   * **/etc/group**.
  
-====/etc/nsswitch.conf sous RHEL 8====+====/etc/nsswitch.conf sous RHEL 9====
  
 <code> <code>
-[root@centos8 ~]# cat /etc/nsswitch.conf +[root@redhat9 ~]# cat /etc/nsswitch.conf 
-# Generated by authselect on Mon Apr 19 11:54:28 2021+# Generated by authselect on Wed Sep 25 12:09:11 2024
 # Do not modify this file manually. # Do not modify this file manually.
  
Ligne 78: Ligne 78:
 #     hosts: files dns  # from user file #     hosts: files dns  # from user file
  
-passwd:     sss files systemd +passwd:     files sss systemd 
-group:      sss files systemd+group:      files sss systemd
 netgroup:   sss files netgroup:   sss files
 automount:  sss files automount:  sss files
 services:   sss files services:   sss files
-... + 
-shadow:     files sss +# Included from /etc/authselect/user-nsswitch.conf 
-...+ 
 +
 +# /etc/nsswitch.conf 
 +
 +# Name Service Switch config fileThis file should be 
 +# sorted with the most-used services at the beginning. 
 +
 +# Valid databases are: aliases, ethers, group, gshadow, hosts, 
 +# initgroups, netgroup, networks, passwd, protocols, publickey, 
 +# rpc, services, and shadow
 +
 +# Valid service provider entries include (in alphabetical order): 
 +
 +#       compat                  Use /etc files plus *_compat pseudo-db 
 +#       db                      Use the pre-processed /var/db files 
 +#       dns                     Use DNS (Domain Name Service) 
 +#       files                   Use the local files in /etc 
 +#       hesiod                  Use Hesiod (DNS) for user lookups 
 +
 +# See `info libc 'NSS Basics'` for more information. 
 +
 +# Commonly used alternative service providers (may need installation): 
 +
 +#       ldap                    Use LDAP directory server 
 +#       myhostname              Use systemd host names 
 +#       mymachines              Use systemd machine names 
 +#       mdns*, mdns*_minimal    Use Avahi mDNS/DNS-SD 
 +#       resolve                 Use systemd resolved resolver 
 +#       sss                     Use System Security Services Daemon (sssd) 
 +#       systemd                 Use systemd for dynamic user option 
 +#       winbind                 Use Samba winbind support 
 +#       wins                    Use Samba wins support 
 +#       wrapper                 Use wrapper module for testing 
 +
 +# Notes: 
 +
 +# 'sssd' performs its own 'files'-based caching, so it should generally 
 +# come before 'files'. 
 +
 +# WARNING: Running nscd with a secondary caching service like sssd may 
 +#          lead to unexpected behaviour, especially with how long 
 +#          entries are cached. 
 +
 +# Installation instructions: 
 +
 +# To use 'db', install the appropriate package(s) (provide 'makedb' and 
 +# libnss_db.so.*), and place the 'db' in front of 'files' for entries 
 +# you want to be looked up first in the databases, like this: 
 +
 +# passwd:    db files 
 +# shadow:    db files 
 +# group:     db files 
 + 
 +# In order of likelihood of use to accelerate lookup. 
 +shadow:     files 
 +hosts:      files dns myhostname 
 + 
 +aliases:    files 
 +ethers:     files 
 +gshadow:    files 
 +# Allow initgroups to default to the setting for group. 
 +# initgroups: files 
 +networks:   files dns 
 +protocols:  files 
 +publickey:  files 
 +rpc:        files
 </code> </code>
  
Ligne 105: Ligne 170:
  
 <code> <code>
-[root@centos8 ~]# getent passwd trainee+[root@redhat9 ~]# getent passwd trainee
 trainee:x:1000:1000:trainee:/home/trainee:/bin/bash trainee:x:1000:1000:trainee:/home/trainee:/bin/bash
 </code> </code>
Ligne 112: Ligne 177:
  
 <code> <code>
-[root@centos8 ~]# getent group mail+[root@redhat9 ~]# getent group mail
 mail:x:12: mail:x:12:
 </code> </code>
Ligne 119: Ligne 184:
  
 <code> <code>
-[root@centos8 ~]# getent passwd+[root@redhat9 ~]# getent passwd
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
 bin:x:1:1:bin:/bin:/sbin/nologin bin:x:1:1:bin:/bin:/sbin/nologin
Ligne 133: Ligne 198:
 ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
 nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin
-dbus:x:81:81:System message bus:/:/sbin/nologin 
 systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin
-systemd-resolve:x:193:193:systemd Resolver:/:/sbin/nologin +dbus:x:81:81:System message bus:/:/sbin/nologin
-tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin+
 polkitd:x:998:996:User for polkitd:/:/sbin/nologin polkitd:x:998:996:User for polkitd:/:/sbin/nologin
-unbound:x:997:994:Unbound DNS resolver:/etc/unbound:/sbin/nologin +avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin 
-libstoragemgmt:x:996:993:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin +tss:x:59:59:Account used for TPM access:/dev/null:/sbin/nologin 
-cockpit-ws:x:995:991:User for cockpit-ws:/nonexisting:/sbin/nologin +colord:x:997:993:User for colord:/var/lib/colord:/sbin/nologin 
-sssd:x:994:990:User for sssd:/:/sbin/nologin +clevis:x:996:992:Clevis Decryption Framework unprivileged user:/var/cache/clevis:/usr/sbin/nologin 
-setroubleshoot:x:993:989::/var/lib/setroubleshoot:/sbin/nologin +rtkit:x:172:172:RealtimeKit:/proc:/sbin/nologin 
-sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin +sssd:x:995:991:User for sssd:/:/sbin/nologin 
-chrony:x:992:988::/var/lib/chrony:/sbin/nologin+geoclue:x:994:990:User for geoclue:/var/lib/geoclue:/sbin/nologin 
 +libstoragemgmt:x:988:988:daemon account for libstoragemgmt:/:/usr/sbin/nologin 
 +systemd-oom:x:987:987:systemd Userspace OOM Killer:/:/usr/sbin/nologin 
 +setroubleshoot:x:986:986:SELinux troubleshoot server:/var/lib/setroubleshoot:/sbin/nologin 
 +pipewire:x:985:984:PipeWire System Daemon:/var/run/pipewire:/sbin/nologin 
 +flatpak:x:984:983:User for flatpak system helper:/:/sbin/nologin 
 +gdm:x:42:42::/var/lib/gdm:/sbin/nologin 
 +cockpit-ws:x:983:982:User for cockpit web service:/nonexisting:/sbin/nologin 
 +cockpit-wsinstance:x:982:981:User for cockpit-ws instances:/nonexisting:/sbin/nologin 
 +gnome-initial-setup:x:981:980::/run/gnome-initial-setup/:/sbin/nologin 
 +sshd:x:74:74:Privilege-separated SSH:/usr/share/empty.sshd:/sbin/nologin 
 +chrony:x:980:979:chrony system user:/var/lib/chrony:/sbin/nologin 
 +dnsmasq:x:979:978:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin
 tcpdump:x:72:72::/:/sbin/nologin tcpdump:x:72:72::/:/sbin/nologin
 trainee:x:1000:1000:trainee:/home/trainee:/bin/bash trainee:x:1000:1000:trainee:/home/trainee:/bin/bash
-cockpit-wsinstance:x:991:987:User for cockpit-ws instances:/nonexisting:/sbin/nologin 
-rngd:x:990:986:Random Number Generator Daemon:/var/lib/rngd:/sbin/nologin 
-gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin 
-qemu:x:107:107:qemu user:/:/sbin/nologin 
-rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin 
-rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin 
-saslauth:x:988:76:Saslauthd user:/run/saslauthd:/sbin/nologin 
-radvd:x:75:75:radvd user:/:/sbin/nologin 
-dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin 
 </code> </code>
  
Ligne 163: Ligne 229:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/group+[root@redhat9 ~]# cat /etc/group
 root:x:0: root:x:0:
 bin:x:1: bin:x:1:
Ligne 188: Ligne 254:
 users:x:100: users:x:100:
 nobody:x:65534: nobody:x:65534:
-dbus:x:81: 
 utmp:x:22: utmp:x:22:
 utempter:x:35: utempter:x:35:
 input:x:999: input:x:999:
-kvm:x:36:qemu+kvm:x:36:
 render:x:998: render:x:998:
 systemd-journal:x:190: systemd-journal:x:190:
 systemd-coredump:x:997: systemd-coredump:x:997:
-systemd-resolve:x:193: +dbus:x:81:
-tss:x:59:+
 polkitd:x:996: polkitd:x:996:
 printadmin:x:995: printadmin:x:995:
-unbound:x:994: +ssh_keys:x:994: 
-libstoragemgmt:x:993: +avahi:x:70: 
-ssh_keys:x:992: +tss:x:59:clevis 
-cockpit-ws:x:991+colord:x:993: 
-sssd:x:990: +clevis:x:992: 
-setroubleshoot:x:989:+rtkit:x:172
 +sssd:x:991: 
 +geoclue:x:990: 
 +sgx:x:989
 +libstoragemgmt:x:988: 
 +systemd-oom:x:987: 
 +setroubleshoot:x:986: 
 +brlapi:x:985: 
 +pipewire:x:984: 
 +flatpak:x:983: 
 +gdm:x:42: 
 +cockpit-ws:x:982: 
 +cockpit-wsinstance:x:981: 
 +gnome-initial-setup:x:980:
 sshd:x:74: sshd:x:74:
-chrony:x:988:+chrony:x:979:
 slocate:x:21: slocate:x:21:
 +dnsmasq:x:978:
 tcpdump:x:72: tcpdump:x:72:
 trainee:x:1000: trainee:x:1000:
-cockpit-wsinstance:x:987: 
-rngd:x:986: 
-gluster:x:985: 
-qemu:x:107: 
-rpc:x:32: 
-rpcuser:x:29: 
-saslauth:x:76: 
-libvirt:x:984: 
-radvd:x:75: 
-dnsmasq:x:983: 
 screen:x:84: screen:x:84:
 </code> </code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** : Notez que la valeur du GID du groupe root est toujours de 0. Notez que sous RHEL / CentOS 8, les GID des utilisateurs normaux commencent à **1000** et les GID des comptes système sont inclus entre 1 et 99 et entre 201 et 999.+**Important** : Notez que la valeur du GID du groupe root est toujours de 0. Notez que sous RHEL les GID des utilisateurs normaux commencent à **1000** et les GID des comptes système sont inclus entre 1 et 99 et entre 201 et 999.
 </WRAP> </WRAP>
  
Ligne 238: Ligne 306:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/gshadow+[root@redhat9 ~]# cat /etc/gshadow
 root::: root:::
 bin::: bin:::
Ligne 263: Ligne 331:
 users::: users:::
 nobody::: nobody:::
-dbus:!:: 
 utmp:!:: utmp:!::
 utempter:!:: utempter:!::
 input:!:: input:!::
-kvm:!::qemu+kvm:!::
 render:!:: render:!::
 systemd-journal:!:: systemd-journal:!::
 systemd-coredump:!:: systemd-coredump:!::
-systemd-resolve:!:: +dbus:!::
-tss:!::+
 polkitd:!:: polkitd:!::
 printadmin:!:: printadmin:!::
-unbound:!:: 
-libstoragemgmt:!:: 
 ssh_keys:!:: ssh_keys:!::
-cockpit-ws:!::+avahi:!:: 
 +tss:!::clevis 
 +colord:!:: 
 +clevis:!:: 
 +rtkit:!::
 sssd:!:: sssd:!::
 +geoclue:!::
 +sgx:!*::
 +libstoragemgmt:!*::
 +systemd-oom:!*::
 setroubleshoot:!:: setroubleshoot:!::
 +brlapi:!::
 +pipewire:!::
 +flatpak:!::
 +gdm:!::
 +cockpit-ws:!::
 +cockpit-wsinstance:!::
 +gnome-initial-setup:!::
 sshd:!:: sshd:!::
 chrony:!:: chrony:!::
 slocate:!:: slocate:!::
 +dnsmasq:!::
 tcpdump:!:: tcpdump:!::
 trainee:!:: trainee:!::
-cockpit-wsinstance:!:: 
-rngd:!:: 
-gluster:!:: 
-qemu:!:: 
-rpc:!:: 
-rpcuser:!:: 
-saslauth:!:: 
-libvirt:!:: 
-radvd:!:: 
-dnsmasq:!!:: 
 screen:!:: screen:!::
 </code> </code>
Ligne 309: Ligne 379:
  
 <code> <code>
-[root@centos8 ~]# grpck -r +[root@redhat9 ~]# grpck -r 
-[root@centos8 ~]# +[root@redhat9 ~]#
 </code> </code>
  
Ligne 335: Ligne 405:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/passwd+[root@redhat9 ~]# cat /etc/passwd
 root:x:0:0:root:/root:/bin/bash root:x:0:0:root:/root:/bin/bash
 bin:x:1:1:bin:/bin:/sbin/nologin bin:x:1:1:bin:/bin:/sbin/nologin
Ligne 349: Ligne 419:
 ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
 nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin
-dbus:x:81:81:System message bus:/:/sbin/nologin 
 systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin
-systemd-resolve:x:193:193:systemd Resolver:/:/sbin/nologin +dbus:x:81:81:System message bus:/:/sbin/nologin
-tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin+
 polkitd:x:998:996:User for polkitd:/:/sbin/nologin polkitd:x:998:996:User for polkitd:/:/sbin/nologin
-unbound:x:997:994:Unbound DNS resolver:/etc/unbound:/sbin/nologin +avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin 
-libstoragemgmt:x:996:993:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin +tss:x:59:59:Account used for TPM access:/dev/null:/sbin/nologin 
-cockpit-ws:x:995:991:User for cockpit-ws:/nonexisting:/sbin/nologin +colord:x:997:993:User for colord:/var/lib/colord:/sbin/nologin 
-sssd:x:994:990:User for sssd:/:/sbin/nologin +clevis:x:996:992:Clevis Decryption Framework unprivileged user:/var/cache/clevis:/usr/sbin/nologin 
-setroubleshoot:x:993:989::/var/lib/setroubleshoot:/sbin/nologin +rtkit:x:172:172:RealtimeKit:/proc:/sbin/nologin 
-sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin +sssd:x:995:991:User for sssd:/:/sbin/nologin 
-chrony:x:992:988::/var/lib/chrony:/sbin/nologin+geoclue:x:994:990:User for geoclue:/var/lib/geoclue:/sbin/nologin 
 +libstoragemgmt:x:988:988:daemon account for libstoragemgmt:/:/usr/sbin/nologin 
 +systemd-oom:x:987:987:systemd Userspace OOM Killer:/:/usr/sbin/nologin 
 +setroubleshoot:x:986:986:SELinux troubleshoot server:/var/lib/setroubleshoot:/sbin/nologin 
 +pipewire:x:985:984:PipeWire System Daemon:/var/run/pipewire:/sbin/nologin 
 +flatpak:x:984:983:User for flatpak system helper:/:/sbin/nologin 
 +gdm:x:42:42::/var/lib/gdm:/sbin/nologin 
 +cockpit-ws:x:983:982:User for cockpit web service:/nonexisting:/sbin/nologin 
 +cockpit-wsinstance:x:982:981:User for cockpit-ws instances:/nonexisting:/sbin/nologin 
 +gnome-initial-setup:x:981:980::/run/gnome-initial-setup/:/sbin/nologin 
 +sshd:x:74:74:Privilege-separated SSH:/usr/share/empty.sshd:/sbin/nologin 
 +chrony:x:980:979:chrony system user:/var/lib/chrony:/sbin/nologin 
 +dnsmasq:x:979:978:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin
 tcpdump:x:72:72::/:/sbin/nologin tcpdump:x:72:72::/:/sbin/nologin
 trainee:x:1000:1000:trainee:/home/trainee:/bin/bash trainee:x:1000:1000:trainee:/home/trainee:/bin/bash
-cockpit-wsinstance:x:991:987:User for cockpit-ws instances:/nonexisting:/sbin/nologin 
-rngd:x:990:986:Random Number Generator Daemon:/var/lib/rngd:/sbin/nologin 
-gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin 
-qemu:x:107:107:qemu user:/:/sbin/nologin 
-rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin 
-rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin 
-saslauth:x:988:76:Saslauthd user:/run/saslauthd:/sbin/nologin 
-radvd:x:75:75:radvd user:/:/sbin/nologin 
-dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin 
 </code> </code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** : Notez que la valeur de l'UID de root est toujours de 0. Notez que sous RHEL / CentOS 8, les UID des utilisateurs normaux commencent à **1000** et les UID des comptes système sont inclus entre 1 et 99 et entre 201 et 999.+**Important** : Notez que la valeur de l'UID de root est toujours de 0. Notez que sous RHEL 9, les UID des utilisateurs normaux commencent à **1000** et les UID des comptes système sont inclus entre 1 et 99 et entre 201 et 999.
 </WRAP> </WRAP>
  
Ligne 391: Ligne 462:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/shadow +[root@redhat9 ~]# cat /etc/shadow 
-root:$6$9Sa1IumuSlJc8EBg$8jGU/4xGCXy64QuBSMyKOC6/FWs41rdY5tzF5/7yHG6FRS2Y2eOJIcst1JbcvNoqMPDU4lpZ6THW97jwGuQNf1::0:99999:7::: +root:$6$AbCPA3HFsB/NDBkA$q2T8XLo83bPWCid/WHo.i0m9dgjdfQWiZAkqD/ajOjZ8gHdKFYX5y8kuTvIYY/qMjmu9beCk3BZV8ewL/Q15D1::0:99999:7::: 
-bin:*:18264:0:99999:7::: +bin:*:19347:0:99999:7::: 
-daemon:*:18264:0:99999:7::: +daemon:*:19347:0:99999:7::: 
-adm:*:18264:0:99999:7::: +adm:*:19347:0:99999:7::: 
-lp:*:18264:0:99999:7::: +lp:*:19347:0:99999:7::: 
-sync:*:18264:0:99999:7::: +sync:*:19347:0:99999:7::: 
-shutdown:*:18264:0:99999:7::: +shutdown:*:19347:0:99999:7::: 
-halt:*:18264:0:99999:7::: +halt:*:19347:0:99999:7::: 
-mail:*:18264:0:99999:7::: +mail:*:19347:0:99999:7::: 
-operator:*:18264:0:99999:7::: +operator:*:19347:0:99999:7::: 
-games:*:18264:0:99999:7::: +games:*:19347:0:99999:7::: 
-ftp:*:18264:0:99999:7::: +ftp:*:19347:0:99999:7::: 
-nobody:*:18264:0:99999:7::: +nobody:*:19347:0:99999:7::: 
-dbus:!!:18390:::::: +systemd-coredump:!!:19649:::::: 
-systemd-coredump:!!:18390:::::: +dbus:!!:19649:::::: 
-systemd-resolve:!!:18390:::::: +polkitd:!!:19649:::::: 
-tss:!!:18390:::::: +avahi:!!:19649:::::: 
-polkitd:!!:18390:::::: +tss:!!:19649:::::: 
-unbound:!!:18390:::::: +colord:!!:19649:::::: 
-libstoragemgmt:!!:18390:::::: +clevis:!!:19649:::::: 
-cockpit-ws:!!:18390:::::: +rtkit:!!:19649:::::: 
-sssd:!!:18390:::::: +sssd:!!:19649:::::: 
-setroubleshoot:!!:18390:::::: +geoclue:!!:19649:::::: 
-sshd:!!:18390:::::: +libstoragemgmt:!*:19649:::::: 
-chrony:!!:18390:::::: +systemd-oom:!*:19649:::::: 
-tcpdump:!!:18390:::::: +setroubleshoot:!!:19649:::::: 
-trainee:$6$p4HOAHX7UAzw1nQh$VZL12Lye.mR8v1IP2e4f0PCW8DzHj2MMAaA7r2ZLoTnQN7Ziskce3bo/xTMu1bXZm5GebJjSw7.X5tABVNoJ2/::0:99999:7::: +pipewire:!!:19649:::::: 
-cockpit-wsinstance:!!:18736:::::: +flatpak:!!:19649:::::: 
-rngd:!!:18736:::::: +gdm:!!:19649:::::: 
-gluster:!!:18736:::::: +cockpit-ws:!!:19649:::::: 
-qemu:!!:18736:::::: +cockpit-wsinstance:!!:19649:::::: 
-rpc:!!:18736:0:99999:7::: +gnome-initial-setup:!!:19649:::::: 
-rpcuser:!!:18736:::::: +sshd:!!:19649:::::: 
-saslauth:!!:18736:::::: +chrony:!!:19649:::::: 
-radvd:!!:18736:::::: +dnsmasq:!!:19649:::::: 
-dnsmasq:!!:18736::::::+tcpdump:!!:19649:::::: 
 +trainee:$6$RTR0r5su3SinU2DK$dt/TI6LByO3SKM04nopxI33O7.eE62rPQ0DlO2HRH2PUtPM4c1pvh3koznv6nE6Z0oCoM0Fq7IUdt8cbjXUMh0::0:99999:7:::
 </code> </code>
  
Ligne 447: Ligne 519:
  
 <code> <code>
-[root@centos8 ~]# pwck -r +[root@redhat9 ~]# pwck -r 
-user 'cockpit-ws': directory '/nonexisting' does not exist +[root@redhat9 ~]#
-user 'cockpit-wsinstance': directory '/nonexisting' does not exist +
-user 'rngd': directory '/var/lib/rngd' does not exist +
-user 'saslauth': directory '/run/saslauthd' does not exist +
-pwck: no changes+
 </code> </code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** : Les erreurs ci-dessus ne sont pas importantes. Elles sont dues au fait que les répertoires de connexion de certains comptes systèmes ne sont pas créés par le système lors de la création des comptes et ceci justement pour éviter la possibilité qu'un pirate ou un hacker puisse se connecter au système en utilisant le compte concerné. Encore une fois, l'option **-r** permet la vérification des erreurs dans sans le modifier.+**Important** : Les erreurs éventuelles concernant es répertoires de connexion de certains comptes systèmes ne sont pas importantes. Elles sont dues au fait que les répertoires ne sont pas créés par le système lors de la création des comptes. Encore une fois, l'option **-r** permet la vérification des erreurs dans sans le modifier.
 </WRAP> </WRAP>
  
Ligne 478: Ligne 546:
  
 <code> <code>
-[root@centos8 ~]# groupadd --help+[root@redhat9 ~]# groupadd --help
 Usage: groupadd [options] GROUP Usage: groupadd [options] GROUP
  
Ligne 492: Ligne 560:
   -r, --system                  create a system account   -r, --system                  create a system account
   -R, --root CHROOT_DIR         directory to chroot into   -R, --root CHROOT_DIR         directory to chroot into
-  -P, --prefix PREFIX_DIR       directory prefix+  -P, --prefix PREFIX_DI        directory prefix 
 +  -U, --users USERS             list of user members of this group
 </code> </code>
  
Ligne 510: Ligne 579:
  
 <code> <code>
-[root@centos8 ~]# groupdel --help+[root@redhat9 ~]# groupdel --help
 Usage: groupdel [options] GROUP Usage: groupdel [options] GROUP
  
Ligne 527: Ligne 596:
  
 <code> <code>
-[root@centos8 ~]# groupmod --help+[root@redhat9 ~]# groupmod --help
 Usage: groupmod [options] GROUP Usage: groupmod [options] GROUP
  
 Options: Options:
 +  -a, --append                  append the users mentioned by -U option to the group 
 +                                without removing existing user members
   -g, --gid GID                 change the group ID to GID   -g, --gid GID                 change the group ID to GID
   -h, --help                    display this help message and exit   -h, --help                    display this help message and exit
Ligne 539: Ligne 610:
   -R, --root CHROOT_DIR         directory to chroot into   -R, --root CHROOT_DIR         directory to chroot into
   -P, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files   -P, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files
 +  -U, --users USERS             list of user members of this group
 </code> </code>
  
Ligne 548: Ligne 620:
  
 <code> <code>
-[root@centos8 ~]# newgrp --help+[root@redhat9 ~]# newgrp --help
 Usage: newgrp [-] [group] Usage: newgrp [-] [group]
 </code> </code>
Ligne 559: Ligne 631:
  
 <code> <code>
-[root@centos8 ~]# gpasswd --help+[root@redhat9 ~]# gpasswd --help
 Usage: gpasswd [option] GROUP Usage: gpasswd [option] GROUP
  
Ligne 597: Ligne 669:
  
 <code> <code>
-[root@centos8 ~]# useradd --help+[root@redhat9 ~]# useradd --help
 Usage: useradd [options] LOGIN Usage: useradd [options] LOGIN
        useradd -D        useradd -D
Ligne 603: Ligne 675:
  
 Options: Options:
 +      --badname                 do not check for bad names
   -b, --base-dir BASE_DIR       base directory for the home directory of the   -b, --base-dir BASE_DIR       base directory for the home directory of the
                                 new account                                 new account
 +      --btrfs-subvolume-home    use BTRFS subvolume for home directory
   -c, --comment COMMENT         GECOS field of the new account   -c, --comment COMMENT         GECOS field of the new account
   -d, --home-dir HOME_DIR       home directory of the new account   -d, --home-dir HOME_DIR       home directory of the new account
Ligne 650: Ligne 724:
  
 <code> <code>
-[root@centos8 ~]# userdel --help+[root@redhat9 ~]# userdel --help
 Usage: userdel [options] LOGIN Usage: userdel [options] LOGIN
  
Ligne 675: Ligne 749:
  
 <code> <code>
-[root@centos8 ~]# usermod --help+[root@redhat9 ~]# usermod --help
 Usage: usermod [options] LOGIN Usage: usermod [options] LOGIN
  
 Options: Options:
 +  -b, --badname                 allow bad names
   -c, --comment COMMENT         new value of the GECOS field   -c, --comment COMMENT         new value of the GECOS field
   -d, --home HOME_DIR           new home directory for the user account   -d, --home HOME_DIR           new home directory for the user account
Ligne 719: Ligne 794:
  
 <code> <code>
-[root@centos8 ~]# passwd --help+[root@redhat9 ~]# passwd --help
 Usage: passwd [OPTION...] <accountName> Usage: passwd [OPTION...] <accountName>
   -k, --keep-tokens       keep non-expired authentication tokens   -k, --keep-tokens       keep non-expired authentication tokens
Ligne 750: Ligne 825:
  
 <code> <code>
-[root@centos8 ~]# chage --help+[root@redhat9 ~]# chage --help
 Usage: chage [options] LOGIN Usage: chage [options] LOGIN
  
Ligne 757: Ligne 832:
   -E, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE   -E, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
   -h, --help                    display this help message and exit   -h, --help                    display this help message and exit
 +  -i, --iso8601                 use YYYY-MM-DD when printing dates
   -I, --inactive INACTIVE       set password inactive after expiration   -I, --inactive INACTIVE       set password inactive after expiration
                                 to INACTIVE                                 to INACTIVE
Ligne 773: Ligne 849:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/default/useradd+[root@redhat9 ~]# cat /etc/default/useradd
 # useradd defaults file # useradd defaults file
 GROUP=100 GROUP=100
Ligne 798: Ligne 874:
  
 <code> <code>
-[root@centos8 ~]# useradd -D+[root@redhat9 ~]# useradd -D
 GROUP=100 GROUP=100
 HOME=/home HOME=/home
Ligne 811: Ligne 887:
  
 <code> <code>
-[root@centos8 ~]# ls -la /etc/skel+[root@redhat9 ~]# ls -la /etc/skel
 total 24 total 24
-drwxr-xr-x.   root root   62 Apr 19 11:50 +drwxr-xr-x.   root root   78 Sep 25 11:52 
-drwxr-xr-x. 106 root root 8192 Apr 20 10:17 .. +drwxr-xr-x. 134 root root 8192 Sep 26 14:57 .. 
--rw-r--r--.   1 root root   18 Jul 21  2020 .bash_logout +-rw-r--r--.   1 root root   18 Feb 15  2024 .bash_logout 
--rw-r--r--.   1 root root  141 Jul 21  2020 .bash_profile +-rw-r--r--.   1 root root  141 Feb 15  2024 .bash_profile 
--rw-r--r--.   1 root root  376 Jul 21  2020 .bashrc+-rw-r--r--.   1 root root  492 Feb 15  2024 .bashrc 
 +drwxr-xr-x.   4 root root   39 Oct 19  2023 .mozilla
  
 </code> </code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** : Notez que sous RHEL / CentOS le fichier **.bash_profile** remplace le fichier **.profile**.+**Important** : Notez que sous RHEL le fichier **.bash_profile** remplace le fichier **.profile**.
 </WRAP> </WRAP>
  
Ligne 828: Ligne 905:
  
 <code> <code>
-[root@centos8 ~]# id trainee+[root@redhat9 ~]# id trainee
 uid=1000(trainee) gid=1000(trainee) groups=1000(trainee) uid=1000(trainee) gid=1000(trainee) groups=1000(trainee)
 </code> </code>
Ligne 835: Ligne 912:
  
 <code> <code>
-[root@centos8 ~]# groups trainee+[root@redhat9 ~]# groups trainee
 trainee : trainee trainee : trainee
 </code> </code>
Ligne 844: Ligne 921:
 ... ...
 # #
-# Min/max values for automatic uid selection in useradd+# Min/max values for automatic uid selection in useradd(8)
 # #
 UID_MIN                  1000 UID_MIN                  1000
Ligne 851: Ligne 928:
 SYS_UID_MIN               201 SYS_UID_MIN               201
 SYS_UID_MAX               999 SYS_UID_MAX               999
 +# Extra per user uids
 +SUB_UID_MIN                100000
 +SUB_UID_MAX             600100000
 +SUB_UID_COUNT               65536
  
 # #
-# Min/max values for automatic gid selection in groupadd+# Min/max values for automatic gid selection in groupadd(8)
 # #
 GID_MIN                  1000 GID_MIN                  1000
Ligne 860: Ligne 941:
 SYS_GID_MIN               201 SYS_GID_MIN               201
 SYS_GID_MAX               999 SYS_GID_MAX               999
 +# Extra per user group ids
 +SUB_GID_MIN                100000
 +SUB_GID_MAX             600100000
 +SUB_GID_COUNT               65536
 ... ...
 </file> </file>
Ligne 868: Ligne 953:
  
 <code> <code>
-[root@centos8 ~]# groupadd groupe1; groupadd groupe2; groupadd -g 1807 groupe3+[root@redhat9 ~]# groupadd groupe1; groupadd groupe2; groupadd -g 1807 groupe3
 </code> </code>
  
Ligne 874: Ligne 959:
  
 <code> <code>
-[root@centos8 ~]# useradd -g groupe2 fenestros2; useradd -g 1807 fenestros3; useradd -g groupe1 fenestros1 +[root@redhat9 ~]# useradd -g groupe2 fenestros2; useradd -g 1807 fenestros3; useradd -g groupe1 fenestros1 
-[root@centos8 ~]# usermod -G groupe1,groupe3 fenestros2 + 
-[root@centos8 ~]# usermod -c "tux1" fenestros1+[root@redhat9 ~]# usermod -G groupe1,groupe3 fenestros2 
 + 
 +[root@redhat9 ~]# usermod -c "tux1" fenestros1
 </code> </code>
  
Ligne 882: Ligne 969:
  
 <code> <code>
-[root@centos8 ~]# tail /etc/passwd +[root@redhat9 ~]# tail /etc/passwd 
-gluster:x:989:985:GlusterFS daemons:/run/gluster:/sbin/nologin +gnome-initial-setup:x:981:980::/run/gnome-initial-setup/:/sbin/nologin 
-qemu:x:107:107:qemu user:/:/sbin/nologin +sshd:x:74:74:Privilege-separated SSH:/usr/share/empty.sshd:/sbin/nologin 
-rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin +chrony:x:980:979:chrony system user:/var/lib/chrony:/sbin/nologin 
-rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin +dnsmasq:x:979:978:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin 
-saslauth:x:988:76:Saslauthd user:/run/saslauthd:/sbin/nologin +tcpdump:x:72:72::/:/sbin/nologin 
-radvd:x:75:75:radvd user:/:/sbin/nologin +trainee:x:1000:1000:trainee:/home/trainee:/bin/bash
-dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin+
 fenestros2:x:1001:1002::/home/fenestros2:/bin/bash fenestros2:x:1001:1002::/home/fenestros2:/bin/bash
 fenestros3:x:1002:1807::/home/fenestros3:/bin/bash fenestros3:x:1002:1807::/home/fenestros3:/bin/bash
Ligne 898: Ligne 984:
  
 <code> <code>
-[root@centos8 ~]# tail /etc/group +[root@redhat9 ~]# tail /etc/group 
-rpc:x:32+chrony:x:979
-rpcuser:x:29+slocate:x:21
-saslauth:x:76+dnsmasq:x:978
-libvirt:x:984+tcpdump:x:72
-radvd:x:75: +trainee:x:1000:
-dnsmasq:x:983:+
 screen:x:84: screen:x:84:
 groupe1:x:1001:fenestros2 groupe1:x:1001:fenestros2
Ligne 914: Ligne 999:
  
 <code> <code>
-[root@centos8 ~]# gpasswd groupe3+[root@redhat9 ~]# gpasswd groupe3
 Changing the password for group groupe3 Changing the password for group groupe3
 New Password: fenestros New Password: fenestros
-Re-enter new password: fenestros +Re-enter new password: fenestros
 </code> </code>
  
Ligne 927: Ligne 1012:
  
 <code> <code>
-[root@centos8 ~]# tail /etc/gshadow +[root@redhat9 ~]# tail /etc/gshadow 
-rpc:!:: +chrony:!:: 
-rpcuser:!:: +slocate:!:: 
-saslauth:!:: +dnsmasq:!:: 
-libvirt:!:: +tcpdump:!:: 
-radvd:!:: +trainee:!::
-dnsmasq:!!::+
 screen:!:: screen:!::
 groupe1:!::fenestros2 groupe1:!::fenestros2
 groupe2:!:: groupe2:!::
-groupe3:$6$c0nWuaO.7BveY$qZ907ORU.vEOhlYcka.VCL1Im0obgxJg8g3SvWnEA3YiZc9TB3CXEU/8nnNNAg5fBAhct7PNUXdPXwsSsY0Zg0::fenestros2+groupe3:$6$EjmZ4ucT6i/QPvkm$NvJ6r8ytCgdzDfZBSVCXdxUTJJL7RE/gjTsOYiV3UjKuoZp67OoxsERcBCAB71WXF4JcYLRjGGZxTxRg5kgiB.::fenestros2
 </code> </code>
  
Ligne 947: Ligne 1031:
  
 <code> <code>
-[root@centos8 ~]# gpasswd -A fenestros1 groupe3+[root@redhat9 ~]# gpasswd -A fenestros1 groupe3
 </code> </code>
  
Ligne 953: Ligne 1037:
  
 <code> <code>
-[root@centos8 ~]# tail /etc/gshadow +[root@redhat9 ~]# tail /etc/gshadow 
-rpc:!:: +chrony:!:: 
-rpcuser:!:: +slocate:!:: 
-saslauth:!:: +dnsmasq:!:: 
-libvirt:!:: +tcpdump:!:: 
-radvd:!:: +trainee:!::
-dnsmasq:!!::+
 screen:!:: screen:!::
 +apache:!::
 groupe1:!::fenestros2 groupe1:!::fenestros2
 groupe2:!:: groupe2:!::
-groupe3:$6$c0nWuaO.7BveY$qZ907ORU.vEOhlYcka.VCL1Im0obgxJg8g3SvWnEA3YiZc9TB3CXEU/8nnNNAg5fBAhct7PNUXdPXwsSsY0Zg0:fenestros1:fenestros2+groupe3:$6$EjmZ4ucT6i/QPvkm$NvJ6r8ytCgdzDfZBSVCXdxUTJJL7RE/gjTsOYiV3UjKuoZp67OoxsERcBCAB71WXF4JcYLRjGGZxTxRg5kgiB.:fenestros1:fenestros2
 </code> </code>
  
Ligne 973: Ligne 1057:
  
 <code> <code>
-[root@centos8 ~]# groupdel groupe3+[root@redhat9 ~]# groupdel groupe3
 groupdel: cannot remove the primary group of user 'fenestros3' groupdel: cannot remove the primary group of user 'fenestros3'
 </code> </code>
Ligne 984: Ligne 1068:
  
 <code> <code>
-[root@centos8 ~]# userdel fenestros3+[root@redhat9 ~]# userdel fenestros3
 </code> </code>
  
Ligne 990: Ligne 1074:
  
 <code> <code>
-[root@centos8 ~]# groupdel groupe3+[root@redhat9 ~]# groupdel groupe3
 </code> </code>
  
Ligne 999: Ligne 1083:
 Le fait de supprimer un utilisateur **sans** l'option **-r** implique que le répertoire personnel de l'utilisateur demeure sur le système.  Le fait de supprimer un utilisateur **sans** l'option **-r** implique que le répertoire personnel de l'utilisateur demeure sur le système. 
  
-Saisissez la commande suivante sous RHEL / CentOS 8 pour vérifier :+Saisissez la commande suivante sous RHEL pour vérifier :
  
 <code> <code>
-[root@centos8 ~]# ls -ld /home/fenestros3 +[root@redhat9 ~]# ls -ld /home/fenestros3 
-drwx------. 1002 groupe3 62 Apr 20 14:28 /home/fenestros3+drwx------. 1002 1807 78 Sep 27 13:59 /home/fenestros3
 </code> </code>
  
Ligne 1009: Ligne 1093:
  
 <code> <code>
-[root@centos8 ~]# find /home -user 1002 -exec rm -rf {} \;+[root@redhat9 ~]# find /home -user 1002 -exec rm -rf {} \;
 find: ‘/home/fenestros3’: No such file or directory find: ‘/home/fenestros3’: No such file or directory
-[root@centos8 ~]# ls -ld /home/fenestros3+ 
 +[root@redhat9 ~]# ls -ld /home/fenestros3
 ls: cannot access '/home/fenestros3': No such file or directory ls: cannot access '/home/fenestros3': No such file or directory
 </code> </code>
Ligne 1022: Ligne 1107:
  
 <code> <code>
-[root@centos8 ~]# passwd fenestros1+[root@redhat9 ~]# passwd fenestros1
 Changing password for user fenestros1. Changing password for user fenestros1.
 New password: fenestros1 New password: fenestros1
Ligne 1028: Ligne 1113:
 Retype new password: fenestros1 Retype new password: fenestros1
 passwd: all authentication tokens updated successfully. passwd: all authentication tokens updated successfully.
-[root@centos8 ~]# passwd fenestros2+ 
 +[root@redhat9 ~]# passwd fenestros2
 Changing password for user fenestros2. Changing password for user fenestros2.
 New password: fenestros2 New password: fenestros2
Ligne 1047: Ligne 1133:
  
 <code> <code>
-[root@centos8 ~]# ls -l /etc/pam.d +[root@redhat9 ~]# ls -l /etc/pam.d 
-total 88 +total 128 
--rw-r--r--. 1 root root 272 May 11  2019 atd +-rw-r--r--. 1 root root 272 Apr  4  2022 atd 
--rw-r--r--. 1 root root 192 Jul 21  2020 chfn +-rw-r--r--. 1 root root 192 Feb  8  2024 chfn 
--rw-r--r--. 1 root root 192 Jul 21  2020 chsh +-rw-r--r--. 1 root root 192 Feb  8  2024 chsh 
--rw-r--r--. 1 root root 997 Aug 19  2020 cockpit +-rw-r--r--. 1 root root 910 Apr  2 05:27 cockpit 
--rw-r--r--. 1 root root 232 Jun 15  2020 config-util +-rw-r--r--. 1 root root 232 Feb 12  2024 config-util 
--rw-r--r--. 1 root root 328 Nov  8  2019 crond +-rw-r--r--. 1 root root 322 Feb 15  2019 crond 
-lrwxrwxrwx. 1 root root  32 Apr 19 11:54 fingerprint-auth -> /etc/authselect/fingerprint-auth +-r--r--r--. 1 root root 146 Jun 19 11:00 cups 
--rw-r--r--. 1 root root 715 Jul 21  2020 login +lrwxrwxrwx. 1 root root  32 Sep 25 12:09 fingerprint-auth -> /etc/authselect/fingerprint-auth 
--rw-r--r--. 1 root root 154 Jun 15  2020 other +-rw-r--r--. 1 root root 622 Jul 23  2021 gdm-autologin 
--rw-r--r--. 1 root root 168 Apr  6  2020 passwd +-rw-r--r--. 1 root root 561 Jul 23  2021 gdm-fingerprint 
-lrwxrwxrwx. 1 root root  29 Apr 19 11:54 password-auth -> /etc/authselect/password-auth +-rw-r--r--. 1 root root 307 Jul 23  2021 gdm-launch-environment 
--rw-r--r--. 1 root root 155 Apr   2020 polkit-1 +-rw-r--r--. 1 root root 787 Jul 23  2021 gdm-password 
-lrwxrwxrwx. 1 root root  25 Apr 19 11:54 postlogin -> /etc/authselect/postlogin +-rw-r--r--. 1 root root 800 Jul 23  2021 gdm-pin 
--rw-r--r--. 1 root root 640 Jul 21  2020 remote +-rw-r--r--. 1 root root 553 Jul 23  2021 gdm-smartcard 
--rw-r--r--. 1 root root 143 Jul 21  2020 runuser +-rw-r--r--. 1 root root 676 Feb  8  2024 login 
--rw-r--r--. 1 root root 138 Jul 21  2020 runuser-l +-rw-r--r--. 1 root root 154 Feb 12  2024 other 
--rw-r--r--. 1 root root  36 Jul 20  2019 screen +-rw-r--r--. 1 root root 168 Aug 10  2021 passwd 
-lrwxrwxrwx. 1 root root  30 Apr 19 11:54 smartcard-auth -> /etc/authselect/smartcard-auth +lrwxrwxrwx. 1 root root  29 Sep 25 12:09 password-auth -> /etc/authselect/password-auth 
--rw-r--r--. 1 root root 727 Apr 26  2020 sshd +-rw-r--r--. 1 root root 155 Dec   2022 polkit-1 
--rw-r--r--. 1 root root 214 Sep 17  2020 sssd-shadowutils +lrwxrwxrwx. 1 root root  25 Sep 25 12:09 postlogin -> /etc/authselect/postlogin 
--rw-r--r--. 1 root root 566 Jul 21  2020 su +-rw-r--r--. 1 root root 640 Feb  8  2024 remote 
--rw-r--r--. 1 root root 154 Jan 26 16:58 sudo +-rw-r--r--. 1 root root 143 Feb  8  2024 runuser 
--rw-r--r--. 1 root root 178 Jan 26 16:58 sudo-i +-rw-r--r--. 1 root root 138 Feb  8  2024 runuser-l 
--rw-r--r--. 1 root root 137 Jul 21  2020 su-l +-rw-r--r--. 1 root root  36 Jan  4  2022 screen 
-lrwxrwxrwx. 1 root root  27 Apr 19 11:54 system-auth -> /etc/authselect/system-auth +lrwxrwxrwx. 1 root root  30 Sep 25 12:09 smartcard-auth -> /etc/authselect/smartcard-auth 
--rw-r--r--. 1 root root 248 Apr  7 16:55 systemd-user +-rw-r--r--. 1 root root 727 Jul  3 11:56 sshd 
--rw-r--r--. 1 root root  84 Jul 20  2020 vlock+-rw-r--r--. 1 root root 214 Jan 12  2024 sssd-shadowutils 
 +-rw-r--r--. 1 root root 566 Feb  8  2024 su 
 +-rw-r--r--. 1 root root  97 Jan 18  2024 subscription-manager 
 +-rw-r--r--. 1 root root 154 Jan 24  2024 sudo 
 +-rw-r--r--. 1 root root 178 Jan 24  2024 sudo-i 
 +-rw-r--r--. 1 root root 137 Feb  8  2024 su-l 
 +lrwxrwxrwx. 1 root root  27 Sep 25 12:09 system-auth -> /etc/authselect/system-auth 
 +-rw-r--r--. 1 root root 414 Jul 18 13:00 systemd-user 
 +-rw-r--r--. 1 root root  84 Jun 21  2023 vlock 
 +-rw-r--r--. 1 root root 159 Dec  4  2023 vmtoolsd 
 +-rw-r--r--. 1 root root 163 Jan 19  2024 xserver
 </code> </code>
  
Ligne 1081: Ligne 1177:
  
 <code> <code>
-[root@centos8 ~]# ls -l /lib64/security +[root@redhat9 ~]# ls -l /lib64/security 
-total 1880 +total 1724 
--rwxr-xr-x. 1 root root  19992 Jun 15  2020 pam_access.so +-rwxr-xr-x. 1 root root  19560 Feb 12  2024 pam_access.so 
--rwxr-xr-x. 1 root root  15680 Jun 15  2020 pam_cap.so +-rwxr-xr-x. 1 root root  15136 Jul 12  2023 pam_cap.so 
--rwxr-xr-x. 1 root root  11624 Jun 15  2020 pam_chroot.so +-rwxr-xr-x. 1 root root  15288 Feb 12  2024 pam_chroot.so 
--rwxr-xr-x. 1 root root  16168 Aug 24  2020 pam_cockpit_cert.so +-rwxr-xr-x. 1 root root  15008 Apr  2 05:45 pam_cockpit_cert.so 
--rwxr-xr-x. 1 root root  28904 Jun 15  2020 pam_console.so +-rwxr-xr-x. 1 root root  32112 Feb 12  2024 pam_console.so 
--rwxr-xr-x. 1 root root  19888 Jun 15  2020 pam_cracklib.so +-rwxr-xr-x. 1 root root  15344 Feb 12  2024 pam_debug.so 
--rwxr-xr-x. 1 root root  11712 Jun 15  2020 pam_debug.so +-rwxr-xr-x. 1 root root  15040 Feb 12  2024 pam_deny.so 
--rwxr-xr-x. 1 root root   7472 Jun 15  2020 pam_deny.so +-rwxr-xr-x. 1 root root  15368 Feb 12  2024 pam_echo.so 
--rwxr-xr-x. 1 root root  11728 Jun 15  2020 pam_echo.so +-rwxr-xr-x. 1 root root  19568 Feb 12  2024 pam_env.so 
--rwxr-xr-x. 1 root root  20080 Jun 15  2020 pam_env.so +-rwxr-xr-x. 1 root root  23536 Feb 12  2024 pam_exec.so 
--rwxr-xr-x. 1 root root  15792 Jun 15  2020 pam_exec.so +-rwxr-xr-x. 1 root root  15304 Feb 12  2024 pam_faildelay.so 
--rwxr-xr-x. 1 root root  11640 Jun 15  2020 pam_faildelay.so +-rwxr-xr-x. 1 root root  23632 Feb 12  2024 pam_faillock.so 
--rwxr-xr-x. 1 root root  20424 Jun 15  2020 pam_faillock.so +drwxr-xr-x. 2 root root     24 Sep 25 11:56 pam_filter 
-drwxr-xr-x. 2 root root     24 Apr 19 11:50 pam_filter +-rwxr-xr-x. 1 root root  19472 Feb 12  2024 pam_filter.so 
--rwxr-xr-x. 1 root root  15824 Jun 15  2020 pam_filter.so +-rwxr-xr-x. 1 root root  32600 Aug 26  2021 pam_fprintd.so 
--rwxr-xr-x. 1 root root  28864 Apr 14  2020 pam_fprintd.so +-rwxr-xr-x. 1 root root  15296 Feb 12  2024 pam_ftp.so 
--rwxr-xr-x. 1 root root  11632 Jun 15  2020 pam_ftp.so +-rwxr-xr-x. 1 root root  15328 Jan 18  2024 pam_gdm.so 
--rwxr-xr-x. 1 root root  15800 Jun 15  2020 pam_group.so +-rwxr-xr-x. 1 root root  31960 Jul  9 15:38 pam_gnome_keyring.so 
--rwxr-xr-x. 1 root root  11664 Jun 15  2020 pam_issue.so +-rwxr-xr-x. 1 root root  19456 Feb 12  2024 pam_group.so 
--rwxr-xr-x. 1 root root  11656 Jun 15  2020 pam_keyinit.so +-rwxr-xr-x. 1 root root  15336 Feb 12  2024 pam_issue.so 
--rwxr-xr-x. 1 root root  20048 Jun 15  2020 pam_lastlog.so +-rwxr-xr-x. 1 root root  15464 Feb 12  2024 pam_keyinit.so 
--rwxr-xr-x. 1 root root  23968 Jun 15  2020 pam_limits.so +-rwxr-xr-x. 1 root root  19632 Feb 12  2024 pam_lastlog.so 
--rwxr-xr-x. 1 root root  11672 Jun 15  2020 pam_listfile.so +-rwxr-xr-x. 1 root root  27648 Feb 12  2024 pam_limits.so 
--rwxr-xr-x. 1 root root  11664 Jun 15  2020 pam_localuser.so +-rwxr-xr-x. 1 root root  15352 Feb 12  2024 pam_listfile.so 
--rwxr-xr-x. 1 root root  11680 Jun 15  2020 pam_loginuid.so +-rwxr-xr-x. 1 root root  15344 Feb 12  2024 pam_localuser.so 
--rwxr-xr-x. 1 root root  15768 Jun 15  2020 pam_mail.so +-rwxr-xr-x. 1 root root  15360 Feb 12  2024 pam_loginuid.so 
--rwxr-xr-x. 1 root root  11624 Jun 15  2020 pam_mkhomedir.so +-rwxr-xr-x. 1 root root  19416 Feb 12  2024 pam_mail.so 
--rwxr-xr-x. 1 root root  11760 Jun 15  2020 pam_motd.so +-rwxr-xr-x. 1 root root  15296 Feb 12  2024 pam_mkhomedir.so 
--rwxr-xr-x. 1 root root  45232 Jun 15  2020 pam_namespace.so +-rwxr-xr-x. 1 root root  15376 Feb 12  2024 pam_motd.so 
--rwxr-xr-x. 1 root root  11688 Jun 15  2020 pam_nologin.so +-rwxr-xr-x. 1 root root  44264 Feb 12  2024 pam_namespace.so 
--rwxr-xr-x. 1 root root  41672 Nov  3 11:34 pam_oddjob_mkhomedir.so +-rwxr-xr-x. 1 root root  15344 Feb 12  2024 pam_nologin.so 
--rwxr-xr-x. 1 root root   7560 Jun 15  2020 pam_permit.so +-rwxr-xr-x. 1 root root  15328 Feb 12  2024 pam_permit.so 
--rwxr-xr-x. 1 root root   7536 Jun 15  2020 pam_postgresok.so +-rwxr-xr-x. 1 root root  15296 Feb 12  2024 pam_postgresok.so 
--rwxr-xr-x. 1 root root  20344 Jun 15  2020 pam_pwhistory.so +-rwxr-xr-x. 1 root root  27624 Feb 12  2024 pam_pwhistory.so 
--rwxr-xr-x. 1 root root  11896 May 10  2019 pam_pwquality.so +-rwxr-xr-x. 1 root root  15840 Aug 10  2021 pam_pwquality.so 
--rwxr-xr-x. 1 root root  11632 Jun 15  2020 pam_rhosts.so +-rwxr-xr-x. 1 root root  15296 Feb 12  2024 pam_rhosts.so 
--rwxr-xr-x. 1 root root  11688 Jun 15  2020 pam_rootok.so +-rwxr-xr-x. 1 root root  15352 Feb 12  2024 pam_rootok.so 
--rwxr-xr-x. 1 root root  11688 Jun 15  2020 pam_securetty.so +-rwxr-xr-x. 1 root root  15360 Feb 12  2024 pam_securetty.so 
-lrwxrwxrwx. 1 root root     15 Jun 15  2020 pam_selinux_permit.so -> pam_sepermit.so +lrwxrwxrwx. 1 root root     15 Feb 12  2024 pam_selinux_permit.so -> pam_sepermit.so 
--rwxr-xr-x. 1 root root  24088 Jun 15  2020 pam_selinux.so +-rwxr-xr-x. 1 root root  27720 Feb 12  2024 pam_selinux.so 
--rwxr-xr-x. 1 root root  15800 Jun 15  2020 pam_sepermit.so +-rwxr-xr-x. 1 root root  19472 Feb 12  2024 pam_sepermit.so 
--rwxr-xr-x. 1 root root  11656 Jun 15  2020 pam_shells.so +-rwxr-xr-x. 1 root root  19424 Feb 12  2024 pam_setquota.so 
--rwxr-xr-x. 1 root root  24272 Aug 24  2020 pam_ssh_add.so +-rwxr-xr-x. 1 root root  15328 Feb 12  2024 pam_shells.so 
--rwxr-xr-x. 1 root root  54088 Sep 17  2020 pam_sss.so +-rwxr-xr-x. 1 root root  27928 Apr  2 05:45 pam_ssh_add.so 
--rwxr-xr-x. 1 root root  15864 Jun 15  2020 pam_stress.so +-rwxr-xr-x. 1 root root  36216 May 17 03:59 pam_sss_gss.so 
--rwxr-xr-x. 1 root root  15848 Jun 15  2020 pam_succeed_if.so +-rwxr-xr-x. 1 root root  69264 May 17 03:59 pam_sss.so 
--rwxr-xr-x. 1 root root 906728 Apr  7 16:56 pam_systemd.so +-rwxr-xr-x. 1 root root  19528 Feb 12  2024 pam_stress.so 
--rwxr-xr-x. 1 root root  15784 Jun 15  2020 pam_time.so +-rwxr-xr-x. 1 root root  19520 Feb 12  2024 pam_succeed_if.so 
--rwxr-xr-x. 1 root root  24664 Jun 15  2020 pam_timestamp.so +-rwxr-xr-x. 1 root root 514384 Jul 18 13:01 pam_systemd.so 
--rwxr-xr-x. 1 root root  15792 Jun 15  2020 pam_tty_audit.so +-rwxr-xr-x. 1 root root  19456 Feb 12  2024 pam_time.so 
--rwxr-xr-x. 1 root root  11648 Jun 15  2020 pam_umask.so +-rwxr-xr-x. 1 root root  27696 Feb 12  2024 pam_timestamp.so 
-lrwxrwxrwx. 1 root root     11 Jun 15  2020 pam_unix_acct.so -> pam_unix.so +-rwxr-xr-x. 1 root root  15344 Feb 12  2024 pam_tty_audit.so 
-lrwxrwxrwx. 1 root root     11 Jun 15  2020 pam_unix_auth.so -> pam_unix.so +-rwxr-xr-x. 1 root root  15296 Feb 12  2024 pam_umask.so 
-lrwxrwxrwx. 1 root root     11 Jun 15  2020 pam_unix_passwd.so -> pam_unix.so +lrwxrwxrwx. 1 root root     11 Feb 12  2024 pam_unix_acct.so -> pam_unix.so 
-lrwxrwxrwx. 1 root root     11 Jun 15  2020 pam_unix_session.so -> pam_unix.so +lrwxrwxrwx. 1 root root     11 Feb 12  2024 pam_unix_auth.so -> pam_unix.so 
--rwxr-xr-x. 1 root root  57856 Jun 15  2020 pam_unix.so +lrwxrwxrwx. 1 root root     11 Feb 12  2024 pam_unix_passwd.so -> pam_unix.so 
--rwxr-xr-x. 1 root root  15800 Jun 15  2020 pam_userdb.so +lrwxrwxrwx. 1 root root     11 Feb 12  2024 pam_unix_session.so -> pam_unix.so 
--rwxr-xr-x. 1 root root  11736 Jun 15  2020 pam_usertype.so +-rwxr-xr-x. 1 root root  56824 Feb 12  2024 pam_unix.so 
--rwxr-xr-x. 1 root root   7576 Jun 15  2020 pam_warn.so +-rwxr-xr-x. 1 root root  19472 Feb 12  2024 pam_userdb.so 
--rwxr-xr-x. 1 root root  11672 Jun 15  2020 pam_wheel.so +-rwxr-xr-x. 1 root root  15384 Feb 12  2024 pam_usertype.so 
--rwxr-xr-x. 1 root root  23960 Jun 15  2020 pam_xauth.so+-rwxr-xr-x. 1 root root  15344 Feb 12  2024 pam_warn.so 
 +-rwxr-xr-x. 1 root root  15352 Feb 12  2024 pam_wheel.so 
 +-rwxr-xr-x. 1 root root  27632 Feb 12  2024 pam_xauth.so
 </code> </code>
  
Ligne 1161: Ligne 1259:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/pam.d/login+[root@redhat9 ~]# cat /etc/pam.d/login
 #%PAM-1.0 #%PAM-1.0
 auth       substack     system-auth auth       substack     system-auth
Ligne 1171: Ligne 1269:
 session    required     pam_selinux.so close session    required     pam_selinux.so close
 session    required     pam_loginuid.so session    required     pam_loginuid.so
-session    optional     pam_console.so 
 # pam_selinux.so open should only be followed by sessions to be executed in the user context # pam_selinux.so open should only be followed by sessions to be executed in the user context
 session    required     pam_selinux.so open session    required     pam_selinux.so open
Ligne 1212: Ligne 1309:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/pam.d/other+[root@redhat9 ~]# cat /etc/pam.d/other
 #%PAM-1.0 #%PAM-1.0
 auth     required       pam_deny.so auth     required       pam_deny.so
Ligne 1227: Ligne 1324:
  
 <code> <code>
-[root@centos8 ~]# ls /etc/security +[root@redhat9 ~]# ls /etc/security 
-access.conf       console.perms    limits.d        opasswd         time.conf +access.conf  console.apps      console.perms    faillock.conf  limits.conf  namespace.conf  namespace.init  pam_env.conf    pwquality.conf    sepermit.conf 
-chroot.conf       console.perms.d  namespace.conf  pam_env.conf +chroot.conf  console.handlers  console.perms.d  group.conf     limits.d     namespace.d     opasswd         pwhistory.conf  pwquality.conf. time.conf
-console.apps      group.conf       namespace.d     pwquality.conf +
-console.handlers  limits.conf      namespace.init  sepermit.conf+
 </code> </code>
  
Ligne 1244: Ligne 1339:
 | **limits.conf** | Utilisé par le module pam_limits.so | | **limits.conf** | Utilisé par le module pam_limits.so |
 | **pam_env.conf** | Utilisé par le module pam_env.so | | **pam_env.conf** | Utilisé par le module pam_env.so |
-| **pwquality.conf** | Utilisé par le module pam_cracklib.so |+| **pwquality.conf** | Utilisé par le module pam_pwquality.so |
 | **time.conf** | Utilisé par le module pam_time.so | | **time.conf** | Utilisé par le module pam_time.so |
  
Ligne 1250: Ligne 1345:
  
 <code> <code>
-[root@centos8 ~]# vi /etc/security/pwquality.conf +[root@redhat9 ~]# vi /etc/security/pwquality.conf 
-[root@centos8 ~]# cat /etc/security/pwquality.conf+ 
 +[root@redhat9 ~]# cat /etc/security/pwquality.conf
 # Configuration for systemwide password quality limits # Configuration for systemwide password quality limits
 # Defaults: # Defaults:
Ligne 1266: Ligne 1362:
 # The maximum credit for having digits in the new password. If less than 0 # The maximum credit for having digits in the new password. If less than 0
 # it is the minimum number of digits in the new password. # it is the minimum number of digits in the new password.
-dcredit = -2+dcredit = -2 
 # #
 # The maximum credit for having uppercase characters in the new password. # The maximum credit for having uppercase characters in the new password.
 # If less than 0 it is the minimum number of uppercase characters in the new # If less than 0 it is the minimum number of uppercase characters in the new
 # password. # password.
-ucredit = -1+ucredit = -1 
 # #
 # The maximum credit for having lowercase characters in the new password. # The maximum credit for having lowercase characters in the new password.
 # If less than 0 it is the minimum number of lowercase characters in the new # If less than 0 it is the minimum number of lowercase characters in the new
 # password. # password.
-lcredit = -1+lcredit = -1 
 # #
 # The maximum credit for having other characters in the new password. # The maximum credit for having other characters in the new password.
 # If less than 0 it is the minimum number of other characters in the new # If less than 0 it is the minimum number of other characters in the new
 # password. # password.
-ocredit = -1+ocredit = -1 
 # #
 # The minimum number of required classes of characters for the new # The minimum number of required classes of characters for the new
 # password (digits, uppercase, lowercase, others). # password (digits, uppercase, lowercase, others).
-minclass = 4+minclass =  4
 # #
 # The maximum number of allowed consecutive same characters in the new password. # The maximum number of allowed consecutive same characters in the new password.
Ligne 1298: Ligne 1394:
 # Whether to check for the words from the passwd entry GECOS string of the user. # Whether to check for the words from the passwd entry GECOS string of the user.
 # The check is enabled if the value is not 0. # The check is enabled if the value is not 0.
-gecoscheck = 1+gecoscheck = 1 
 # #
 # Whether to check for the words from the cracklib dictionary. # Whether to check for the words from the cracklib dictionary.
Ligne 1307: Ligne 1403:
 # The check is enabled if the value is not 0. # The check is enabled if the value is not 0.
 usercheck = 1 usercheck = 1
 +#
 +# Length of substrings from the username to check for in the password
 +# The check is enabled if the value is greater than 0 and usercheck is enabled.
 +# usersubstr = 0
 # #
 # Whether the check is enforced by the PAM module and possibly other # Whether the check is enforced by the PAM module and possibly other
Ligne 1315: Ligne 1415:
 # Path to the cracklib dictionaries. Default is to use the cracklib default. # Path to the cracklib dictionaries. Default is to use the cracklib default.
 # dictpath = # dictpath =
 +#
 +# Prompt user at most N times before returning with error. The default is 1.
 +# retry = 3
 +#
 +# Enforces pwquality checks on the root user password.
 +# Enabled if the option is present.
 +# enforce_for_root
 +#
 +# Skip testing the password quality for users that are not present in the
 +# /etc/passwd file.
 +# Enabled if the option is present.
 +# local_users_only
 </code> </code>
  
Ligne 1324: Ligne 1436:
  
 <code> <code>
-[root@centos8 ~]# pwd+[root@redhat9 ~]# pwd
 /root /root
 </code> </code>
Ligne 1331: Ligne 1443:
  
 <code> <code>
-[root@centos8 ~]# su fenestros2+[root@redhat9 ~]# su fenestros2
 </code> </code>
  
Ligne 1337: Ligne 1449:
  
 <code> <code>
-[fenestros2@centos8 root]$ pwd+[fenestros2@redhat9 root]$ pwd
 /root /root
 </code> </code>
Ligne 1350: Ligne 1462:
  
 <code> <code>
-[fenestros2@centos8 root]$ exit+[fenestros2@redhat9 root]$ exit
 exit exit
 </code> </code>
Ligne 1357: Ligne 1469:
  
 <code> <code>
-[root@centos8 ~]# su - fenestros2 +[root@redhat9 ~]# su - fenestros2
-Last login: Thu Oct 15 18:30:54 CEST 2015 on pts/0+
 </code> </code>
  
Ligne 1364: Ligne 1475:
  
 <code> <code>
-[fenestros2@centos8 ~]$ pwd+[fenestros2@redhat9 ~]$ pwd
 /home/fenestros2 /home/fenestros2
 </code> </code>
Ligne 1375: Ligne 1486:
  
 =====sudo===== =====sudo=====
- 
-<WRAP center round important 60%> 
-**Important** : Afin de mettre en pratique les exemples qui suivent, vous devez être connecté à votre système en tant que root. Tapez donc la commande **exit** pour sortir de l’environnement de **fenestros2**. 
-</WRAP> 
  
 La commande **sudo** permet à un utilisateur autorisé d'exécuter une commande en tant que **root** ou en tant qu'un autre utilisateur. Lors de l'exécution de la commande, l'UID et le GID éffectifs et réels sont ceux de l'identité de l'utilisateur cible. L'utilisation de la commande **sudo** est une façon simple de déléguer des tâches administratives à d'autres utilisateurs sans communiquer le mot de passe de **root** et sans placer un SUID bit sur l'exécutable. La commande **sudo** est configurée grâce au fichier **/etc/sudoers**.  La commande **sudo** permet à un utilisateur autorisé d'exécuter une commande en tant que **root** ou en tant qu'un autre utilisateur. Lors de l'exécution de la commande, l'UID et le GID éffectifs et réels sont ceux de l'identité de l'utilisateur cible. L'utilisation de la commande **sudo** est une façon simple de déléguer des tâches administratives à d'autres utilisateurs sans communiquer le mot de passe de **root** et sans placer un SUID bit sur l'exécutable. La commande **sudo** est configurée grâce au fichier **/etc/sudoers**. 
Ligne 1385: Ligne 1492:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/sudoers+[fenestros2@redhat9 ~]$ exit 
 +logout 
 + 
 +[root@redhat9 ~]# cat /etc/sudoers
 ## Sudoers allows particular users to run various commands as ## Sudoers allows particular users to run various commands as
 ## the root user, without needing the root password. ## the root user, without needing the root password.
Ligne 1480: Ligne 1590:
 ## Syntax: ## Syntax:
 ## ##
-##  user MACHINE=COMMANDS+##      user    MACHINE=COMMANDS
 ## ##
 ## The COMMANDS section may have other options added to it. ## The COMMANDS section may have other options added to it.
 ## ##
 ## Allow root to run any commands anywhere  ## Allow root to run any commands anywhere 
-root ALL=(ALL)  ALL+root    ALL=(ALL)       ALL
  
 ## Allows members of the 'sys' group to run networking, software,  ## Allows members of the 'sys' group to run networking, software, 
Ligne 1492: Ligne 1602:
  
 ## Allows people in group wheel to run all commands ## Allows people in group wheel to run all commands
-%wheel ALL=(ALL) ALL+%wheel  ALL=(ALL)       ALL
  
 ## Same thing without a password ## Same thing without a password
-# %wheel ALL=(ALL) NOPASSWD: ALL+# %wheel        ALL=(ALL)       NOPASSWD: ALL
  
 ## Allows members of the users group to mount and unmount the  ## Allows members of the users group to mount and unmount the 
Menu