Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

csh.login problem

Jim Mickens
Frequent Advisor

csh.login problem

Installed RH Linux AS 2.1 on a machine to do a feasability test. Users use the Cshell, but I'm getting errors when logging in. I've narrowed the problem down to the following lines in the /etc/csh.login file:
if ( -d /etc/profile.d ) then
set nonomatch
foreach i ( /etc/profile.d/*.csh )
if ( -r $i ) then
source $i
endif
end
unset i nonomatch
endif

The errors I get are:
root: Command not found.
root: Undefined variable.

I can comment out the first if/endif and it still does the same thing. This script is the default that was installed with the OS. If anyone could knows or has any ideas as to what the problem might be, I'd appreciate it.
5 REPLIES
Martin P.J. Zinser
Honored Contributor

Re: csh.login problem

Try to put a set echo in the script to see where you get the problem. Obviously you do not want to do this while you have many other users connecting as they might be annoyed by the wordy output
Jim Mickens
Frequent Advisor

Re: csh.login problem

Good idea. Another thought occurred to me - it might also be another one of the .csh scripts in the /etc/profile.d directory. I put an echo in front of the source command so it just echoed the source instead of actually executing it, and this portion of the script ran without error. Then I ran each source command of the .csh scripts and got the errors when I ran /etc/profile.d/java_jre.csh. Now I just have to figure out what's wrong with that script.
Martin P.J. Zinser
Honored Contributor

Re: csh.login problem

Well, the obvious thing is to check where the JDK/JRE is installed on your system. Root usually has a much more restricted PATH than other users (e.g. no . or /usr/local/bin)
Jim Mickens
Frequent Advisor

Re: csh.login problem

test - sending replies to the messages is blowing up on me.....
Jim Mickens
Frequent Advisor

Re: csh.login problem

Third time's the charm?

The java_jre.csh file had a bad command in it. It said "root = " instead of "set root =" when defining a value. I added 'set' to the command and now it works fine.

Just a heads-up for anyone using RH Linux AS 2.1 with c-shell.....