1820118 Members
3124 Online
109619 Solutions
New Discussion юеВ

/etc/profile and tcsh

 
SOLVED
Go to solution
Barbara Flynn_1
Frequent Advisor

/etc/profile and tcsh

Hi

I have a user that doesn't appear to read either /etc/profile or ~/.profile when it logs in.

I have made some changes to the /etc/profile that I want to apply to all users but in the case of this user they are not being picked up.

It is set up to use tcsh. Is there something about tcsh that bypasses the profiles?

Any help would be greatly appreciated.

Thanks Barbara
3 REPLIES 3
curt larson_1
Honored Contributor
Solution

Re: /etc/profile and tcsh

csh type shells don't use /etc/profile during login. /etc/csh.login is the csh script sourced (executed) before ~/.cshrc and ~/.login when starting a csh login (analogous to /etc/profile in the Bourne shell).
H.Merijn Brand (procura
Honored Contributor

Re: /etc/profile and tcsh

don't forget ~/.tcshrc

this enables you to see a difference between csh and tcsh users

From the section "Startup and shutdown" in the tcsh manual page:

--8<--- Startup and shutdown
A login shell begins by executing commands from the system
files /etc/csh.cshrc and /etc/csh.login. It then executes
commands from files in the user's home directory: first
~/.tcshrc (+) or, if ~/.tcshrc is not found, ~/.cshrc,
then ~/.history (or the value of the histfile shell vari├п┬┐┬╜
able), then ~/.login, and finally ~/.cshdirs (or the value
of the dirsfile shell variable) (+). The shell may read
/etc/csh.login before instead of after /etc/csh.cshrc, and
~/.login before instead of after ~/.tcshrc or ~/.cshrc and
~/.history, if so compiled; see the version shell vari├п┬┐┬╜
able. (+)

Non-login shells read only /etc/csh.cshrc and ~/.tcshrc or
~/.cshrc on startup.

For examples of startup files, please consult
http://tcshrc.sourceforge.net.

Commands like stty(1) and tset(1), which need be run only
once per login, usually go in one's ~/.login file. Users
who need to use the same set of files with both csh(1) and
tcsh can have only a ~/.cshrc which checks for the exis├п┬┐┬╜
tence of the tcsh shell variable (q.v.) before using tcsh-
specific commands, or can have both a ~/.cshrc and a
~/.tcshrc which sources (see the builtin command)
~/.cshrc. The rest of this manual uses `~/.tcshrc' to
mean `~/.tcshrc or, if ~/.tcshrc is not found, ~/.cshrc'.
-->8---

Enjoy, Have FUN!
Enjoy, Have FUN! H.Merijn
Bruno Ganino
Honored Contributor

Re: /etc/profile and tcsh

The tcsh don't process /etc/profile.
If you want see some question on tcsh
http://www.tcsh.org/FAQ

Bruno
Torino (Turin) +2H