[lug] Changing paths

Carl Wagner carl.wagner at level3.com
Tue Apr 4 11:35:58 MDT 2000


Wayde,

I have experienced this under AIX.  When logged into the workstation, some
environment variables,
including, my path were set one way, and when I telnet-ed to the same box they
were set differently.  So... the way I understand how this works is
   KSH  - when logging in the console/x-session you run .profile, then when a
terminal is started
               the .kshrc is run.
          when telnet-ing rlogin-ing just .kshrc is run
   CSH/TCSH - console - .login then in a term .cshrc
          telnet - just .cshrc
It may also affect how the system wide startup files in /etc are run.

Anyone have a better idea how all this works?  I would be glad to know more/be
corrected about
all this.

Carl.

Wayde Allen wrote:
> 
> 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)
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug





More information about the LUG mailing list