]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
docs: excorcise NIS from nsswitch.conf
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Sep 2023 09:50:20 +0000 (11:50 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Sep 2023 13:17:52 +0000 (15:17 +0200)
Let's replace the "compat" module in our proposed nsswitch.conf
configuration with "files", since it is not 1995 anymore.

Fedora and other distros have deprecated and removed NIS support a while
back. While others still retain some support I am not sure we should
advertise it in our examples. Downstream can of course still use
"compat" instead of "files" if they want to, but let's not confuse
people who don't care about NIS anymore with this.

Also, bring the nsswitch.conf snippet in README in line with what our
man pages say.

Also see: https://fedoraproject.org/wiki/Changes/retire_NIS_user_space_utils

README
factory/etc/nsswitch.conf
man/nss-myhostname.xml
man/nss-mymachines.xml
man/nss-resolve.xml
man/nss-systemd.xml

diff --git a/README b/README
index 8e4d967056e36c308e014fb372774cc20dfab18d..a273846a1a8a967e5aa9b52db67c79d142ff2ab0 100644 (file)
--- a/README
+++ b/README
@@ -383,15 +383,16 @@ GLIBC NSS:
         DynamicUser= setting in unit files.)
 
         To make use of these NSS modules, please add them to the "hosts:",
-        "passwd:" and "group:" lines in /etc/nsswitch.conf. The "resolve" module
-        should replace the glibc "dns" module in this file (and don't worry, it
-        chain-loads the "dns" module if it can't talk to resolved).
+        "passwd:", "group:", "shadow:" and "gshadow:" lines in
+        /etc/nsswitch.conf.
 
         The four modules should be used in the following order:
 
-                passwd: compat systemd
-                group: compat systemd
-                hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname
+                passwd: files systemd
+                group: files [SUCCESS=merge] systemd
+                shadow: files systemd
+                gshadow: files systemd
+                hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns
 
 SYSV INIT.D SCRIPTS:
         When calling "systemctl enable/disable/is-enabled" on a unit which is a
index acfa8474d2d7a7291246f847ebae01cd2f6e3085..45a6820c5eaa82f073a684dfea9f9827a7512f15 100644 (file)
@@ -1,8 +1,8 @@
 # This file is part of systemd.
 
-passwd:         compat systemd
-group:          compat [SUCCESS=merge] systemd
-shadow:         compat systemd
+passwd:         files systemd
+group:          files [SUCCESS=merge] systemd
+shadow:         files systemd
 gshadow:        files systemd
 
 hosts:          mymachines resolve [!UNAVAIL=return] files myhostname dns
index 19e7aa237ac01de1b15227cf5e3349395402c494..360e6d7ceb780140f42ee07e1553a042b20796bf 100644 (file)
     <command>nss-myhostname</command> correctly:</para>
 
     <!-- synchronize with other nss-* man pages and factory/etc/nsswitch.conf -->
-<programlisting>passwd:         compat systemd
-group:          compat [SUCCESS=merge] systemd
-shadow:         compat systemd
+<programlisting>passwd:         files systemd
+group:          files [SUCCESS=merge] systemd
+shadow:         files systemd
 gshadow:        files systemd
 
-
 hosts:          mymachines resolve [!UNAVAIL=return] files <command>myhostname</command> dns
 networks:       files
 
index baec10954b26af49cae11a05b2db3bf50c3b36cf..717ecc534b0cd74f454b37ecdcce152968d99a90 100644 (file)
@@ -64,9 +64,9 @@
     <command>nss-mymachines</command> correctly:</para>
 
     <!-- synchronize with other nss-* man pages and factory/etc/nsswitch.conf -->
-    <programlisting>passwd:         compat systemd
-group:          compat [SUCCESS=merge] systemd
-shadow:         compat systemd
+    <programlisting>passwd:         files systemd
+group:          files [SUCCESS=merge] systemd
+shadow:         files systemd
 gshadow:        files systemd
 
 hosts:          <command>mymachines</command> resolve [!UNAVAIL=return] files myhostname dns
index 6a1d84e72172e726081369a441e05e4b09ab71af..d633be2c3dd1796d356e9dcd1af689c48015c257 100644 (file)
     <command>nss-resolve</command> correctly:</para>
 
     <!-- synchronize with other nss-* man pages and factory/etc/nsswitch.conf -->
-<programlisting>passwd:         compat systemd
-group:          compat [SUCCESS=merge] systemd
-shadow:         compat systemd
+<programlisting>passwd:         files systemd
+group:          files [SUCCESS=merge] systemd
+shadow:         files systemd
 gshadow:        files systemd
 
 hosts:          mymachines <command>resolve [!UNAVAIL=return]</command> files myhostname dns
index b7b453825e303f660be2b8b1887ce1884d56df1d..bc975c0e1ad2571a6c841ceb17551769467f6076 100644 (file)
     <literal>passwd:</literal>, <literal>group:</literal>, <literal>shadow:</literal> and
     <literal>gshadow:</literal> in <filename>/etc/nsswitch.conf</filename>.</para>
 
-    <para>It is recommended to place <literal>systemd</literal> after the <literal>files</literal> or
-    <literal>compat</literal> entry of the <filename>/etc/nsswitch.conf</filename> lines so that
-    <filename>/etc/passwd</filename>, <filename>/etc/group</filename>, <filename>/etc/shadow</filename> and
-    <filename>/etc/gshadow</filename> based mappings take precedence.</para>
+    <para>It is recommended to place <literal>systemd</literal> after the <literal>files</literal> entry of
+    the <filename>/etc/nsswitch.conf</filename> lines so that <filename>/etc/passwd</filename>,
+    <filename>/etc/group</filename>, <filename>/etc/shadow</filename> and <filename>/etc/gshadow</filename>
+    based mappings take precedence.</para>
   </refsect1>
 
   <refsect1>
@@ -106,9 +106,9 @@ lrwxrwxrwx. 1 root root   19 May 10 4711.user-privileged -> foobar.user-privileg
     <command>nss-systemd</command> correctly:</para>
 
     <!-- synchronize with other nss-* man pages and factory/etc/nsswitch.conf -->
-    <programlisting>passwd:         compat <command>systemd</command>
-group:          compat [SUCCESS=merge] <command>systemd</command>
-shadow:         compat <command>systemd</command>
+    <programlisting>passwd:         files <command>systemd</command>
+group:          files <command>[SUCCESS=merge] systemd</command>
+shadow:         files <command>systemd</command>
 gshadow:        files <command>systemd</command>
 
 hosts:          mymachines resolve [!UNAVAIL=return] files myhostname dns