Web lists-archives.com

Re: Setting default $PATH for all users

On Fri 08 Feb 2019 at 10:08:49 (-0500), Dan Ritter wrote:
> Richard Owlett wrote: 
> > By my problem definition, any thing in /home/user is not relevant as I
> > explicitly want something that affects all current and future users.
> Everybody, no matter what?
> pam_env can do that.
> PAM is the pluggable authentication module system, and controls
> all sorts of logins.
> man pam_env  for instructions.

Good point. And I notice that /etc/pam.d/lightdm talks about

    # Load environment from /etc/environment and ~/.pam_environment
    session      required pam_env.so readenv=1
    session      required pam_env.so readenv=1 envfile=/etc/default/locale

so experimenting with those files might be an idea.

BTW I notice that /etc/security/pam_env.conf contains a line that can
*set* the PATH, but only contains "PATH", not "PATH=". So I'm afraid
the OP should be searching /etc for USER rather than USER=, even
though this will output a lot more noise.