Re: noob PATH question

From: Logan Shaw (lshaw-usenet_at_austin.rr.com)
Date: 06/30/05


Date: Thu, 30 Jun 2005 00:50:57 GMT

Bill Waddington wrote:
> I'm an old guy with a really embarassing newbie question:
>
> Per advice on blastwave.org I am trying to set PATH globally
> by providing PATH and SUPATH in /etc/default/login and
> /etc/default/su.
>
> What I find is that these seem to apply to root logins and
> user su, but _not_ to a user login. Im running SNV_16 and JDS,
> bash for root and users.
>
> Is there really one (or two) place(s) to set PATH, or does it
> move depending on user and shell?

Here's how it works: the login process sets the PATH. Then
it executes the shell. The shell inherits the PATH setting
form the login process, and then the shell does whatever
it wants to with PATH from there. What it does depends on
the shell and the files the shell reads (like .profile).

So, the answer depends on the shell. It's quite possible that
the reason you saw the behavior you describe is that the login
process dutifully set PATH and then someone's .profile proceeded
to ignore its value and overwrite it with something of its own
choosing.

   - Logan



Relevant Pages

  • Re: OT: Darwinports help
    ... This whole UNIX business has me bamboozled. ... Think of it as job security for badly socialized geeks ... install or your shell doesn't know how to find it. ... instead of set path ... ...
    (rec.pets.dogs.behavior)
  • noob PATH question
    ... Per advice on blastwave.org I am trying to set PATH globally ... by providing PATH and SUPATH in /etc/default/login and ... What I find is that these seem to apply to root logins and ... Is there really one placeto set PATH, ...
    (comp.unix.solaris)
  • Re: noob PATH question
    ... >What I find is that these seem to apply to root logins and ... >bash for root and users. ... >Is there really one placeto set PATH, ...
    (comp.unix.solaris)