On Sun, Sep 24, 2023 at 01:05:32PM -0400, Dan Ritter wrote: > Tom Browder wrote: > > Every time I set up a new host, I have to jump through the hoops trying to > > get the same PATH for ordinary users as well as root, regardless of how > > they log in. Reading the man pages doesn't help my old brain with all the > > caveats. > > > Set it in /etc/profile, which probably has this in it: > > if [ "$(id -u)" -eq 0 ]; then > PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" > else > PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" > fi > export PATH
This file is only read by certain login methods. The whole point of Tom's request was to find something that works for *all* login methods. Sadly, no such thing exists.