[lug] Changing paths

Wayde Allen wallen at boulder.nist.gov
Tue Apr 4 15:54:07 MDT 2000


OK, I have some more info to provide regarding my question about the path
changing depending on where I'm loggin in from.

   - login shell is /usr/bin/tcsh
 
   - I have not defined any login files in my home directory.  By default
     there exists a .bashrc file, but it only contains the comment line
   
        # ~/.bashrc: executed by bash(1) for non-login shells.

     Consequently I don't thing anything in my home directory is causing
     this behaviour.

   - When logged in from the console my path is
     /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
     which matches the path setup by /etc/profile.

   - When logged in from a remote tty my path is /bin:/usr/bin which
     matches the followin entry in /etc/login.defs:

     #
     # *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

   - Again in /etc/login.defs my console logins are defined by

     #
     # If defined, either full pathname of a file containing device names
     # or a ":" delimited list of device names.  Root logins will be
     # allowed only upon these devices.
     #
     CONSOLE         /etc/securetty
     #CONSOLE        console:tty01:tty02:tty03:tty04

   - Checking the file /etc/securetty I find:

     # /etc/securetty: list of terminals on which root is allowed to
     # login.
     # See securetty(5) and login(1).
     tty1
     tty2
     tty3
     tty4
     tty5
     tty6
     tty7
     tty8
     tty9
     tty10
     tty11
     tty12

Since the terminal that I seem to be getting when connecting from a remote
computer appears to be ttyp0 perhaps this is a partial explainaion.
Still, I don't know why /etc/profile appears to run when the login is
from a console terminal, but not from a non-console terminal?

- Wayde
  (wallen at boulder.nist.gov)





More information about the LUG mailing list