Browse Source

Remove a file to allow user login without systemd-logind

was r11604.
Xi Ruoyao 5 years ago
parent
commit
ff979039d9
1 changed files with 5 additions and 8 deletions
  1. 5 8
      chapter06/systemd.xml

+ 5 - 8
chapter06/systemd.xml

@@ -199,14 +199,11 @@ rm -f /usr/bin/xsltproc</userinput></screen>
 
 <screen><userinput remap="adjust">systemd-machine-id-setup</userinput></screen>
 
-    <para>创建 <filename>/lib/systemd/systemd-user-sessions</filename>
-		脚本,使得非特权用户在没有 systemd-logind 的情况下也能登录:</para>
-
-<screen><userinput remap="adjust">cat &gt; /lib/systemd/systemd-user-sessions &lt;&lt; "EOF"
-#!/bin/bash
-rm -f /run/nologin
-EOF
-chmod 755 /lib/systemd/systemd-user-sessions</userinput></screen>
+    <para>阻止 systemd 创建 <filename>/run/nologin</filename>,
+    以允许非特权用户在没有
+    <application>systemd-logind</application>的情况下登录:</para>
+
+<screen><userinput remap="adjust">rm -f /usr/lib/tmpfiles.d/systemd-nologin.conf</userinput></screen>
 
   </sect2>