aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@mengyan1223.wang>2021-05-11 02:27:52 +0800
committerXi Ruoyao <xry111@mengyan1223.wang>2021-05-11 02:27:52 +0800
commitd719b5f36b423dfa19b60aa869f5d1e846c53bd2 (patch)
tree553d15153ec3f60ca63c682d310f460092796f3f
parent2fcfa27ef615901f9375bc08301cbd660bfd4ecd (diff)
shadow: get rid of /bin and /sbin from $PATHxry111/usr-move
This will be the default system-wide setting of LFS. However, it will be free to reset $PATH in .bashrc, so we can't assume everyone will use this. We still need to find and fix breakages caused by hardcoded paths to /bin/some_executable in BLFS packages.
-rw-r--r--chapter08/shadow.xml15
1 files changed, 14 insertions, 1 deletions
diff --git a/chapter08/shadow.xml b/chapter08/shadow.xml
index 354fcbdff..3471b347b 100644
--- a/chapter08/shadow.xml
+++ b/chapter08/shadow.xml
@@ -65,10 +65,23 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;</userinput></s
allows passwords longer than 8 characters. It is also necessary to change
the obsolete <filename class="directory">/var/spool/mail</filename> location
for user mailboxes that Shadow uses by default to the <filename
- class="directory">/var/mail</filename> location used currently:</para>
+ class="directory">/var/mail</filename> location used currently. And,
+ get rid of <filename class="directory">/bin</filename> and
+ <filename class="directory">/sbin</filename> from <envar>PATH</envar>,
+ since they are simply symlinks to their counterpart in
+ <filename class="directory">/usr</filename>.</para>
+
+ <note>
+ <para>If <filename class="directory">/bin</filename> and/or
+ <filename class="directory">/sbin</filename> are prefereed to be
+ left over in <envar>PATH</envar> for some reason, modify
+ <envar>PATH</envar> in <filename>.bashrc</filename> after LFS is
+ built.</para>
+ </note>
<screen><userinput remap="pre">sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \
-e 's:/var/spool/mail:/var/mail:' \
+ -e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
-i etc/login.defs</userinput></screen>
<note>