Hi Bryan:

On Tue, Aug 11, 1998 at 11:25:24AM -0400, Bryan Scaringe wrote:
> This one's driving me nuts.
> there are 4 files sourced when I log in...
>       /etc/profile
>       ~/.profile
>       ~/.bash_profile
>       one other, I can't remember.  Mabye /etc/bashrc or /etc/bash_profile

Those files are sourced when you are already logged in, and bash begins
execution. Before this, login is executed (the program that ask's for your
user name and password), according to the login man page:

     ... The value for $HOME, $SHELL, $PATH, $LOGNAME, and $MAIL are set
     according to the appropriate fields in the password entry. ...

But there is nothing like a path in the /etc/passwd file, but looking at the
/etc/login.defs file you will see it contains:

.
.
# *REQUIRED*  The default PATH settings, for superuser and normal users.
#
# (they are minimal, add the rest in the shell startup files)
ENV_SUPATH      PATH=/sbin:/bin:/usr/sbin:/usr/bin
ENV_PATH        PATH=/bin:/usr/bin
.
.

So there is the default PATH that you are getting at the echo statement in
the /etc/profile file. In fact, if this wheren't this way, you must have
used /bin/echo instead of just echo. :)

NOTE: I'm using Debian GNU/Linux 2.0 and there the default PATH is just
/bin:/usr/bin, so maybe you are using another distribution and the name of
the configuration file for the login command may or may not change.

HTH, See you
Roberto Ruiz

--
LINUX: the FREE 32 bit OS for [3456]86 PC's available NOW!

Reply via email to