tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: sh(1) and ksh(1) default PATH
Hauke Fath wrote in
<20220815111506408018.2367aac6%Espresso.Rhein-Neckar.DE@localhost>:
|On Sun, 14 Aug 2022 09:04:21 +0000 (UTC), RVP wrote:
|> Linux has a pam_env.so which reads /etc/environment and
|> /etc/environment.d/* for this kind of thing. I was looking
|> for something like that on NetBSD a while back...
|
|login.conf(5) can set PATH.
And pam_env does a whole lotta things more, really.
We have the very same discussion on #crux-devel, but there it was
about the sole decision to create a /etc/profile with all sorts of
XDG directories (.. i had written pam_xdg for those (also
available on FreeBSD) but the one hates me ..), and the terrible
-if [ "$UID" = "0" ]; then
- export PATH="/sbin:/usr/sbin:/opt/sbin:/bin:/usr/bin:/opt/bin"
-else
- export PATH="/bin:/usr/bin:/opt/bin"
-fi
+export PATH="/sbin:/usr/sbin:/opt/sbin:/bin:/usr/bin:/opt/bin"
change that _i_ hate.
I also hate pam_env which came up here for the XDG variables
(imagine this!), but it does _so much more_ that i personally
would really hate to see that thing enabled _on each and every
installation by default_.
login.conf, yes! Or heck write a very simple PAM module (the
NetBSD site contains fully fledged examples even) that only reads
_one_ global configuration file at maximum, and sets some
environment variables accordingly.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
Home |
Main Index |
Thread Index |
Old Index