cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Revert chsh changes

 
SOLVED
Go to solution
Tor-Arne Nostdal
Trusted Contributor
Solution

Re: Revert chsh changes

Hi Taurian
The simplest for you would be to have your system administrator (root user), to change your login shell...

It seems as you have changed the login shell from cshrc perhaps to sh/ksh.

csh reads .cshrc file to set you environment
sh/ksh reads your .profile to do this

Now, when switching shell - you seem to have an error in .profile which terminate the processing of defining your environment correctly, or forking new shells.

The mess relate to the error given when parsing the .profile - so you need to get this corrected - and again... since you seem a bit unfamiliare with unix I suggest you get the root user to do this.

Should I pick a guess - you have a .profile who try to source several other environment files - and have syntax error in one of them.
... could even be a SAP system ;)

An alternativ could be to move away the current .profile and replace with a simple template file, just so that you can run the chsh command

/Tor-Arne
I'm trying to become President of the state I'm in...
Taurian
Valued Contributor

Re: Revert chsh changes

Hi Everyone,

Thanks for all your help. Sorry that I was in a rush yesterday that's why I could copy/paste the commands.

Anyways, Tor-Arne's reply was the best and right on the mark, although I am not that much unfamiliar with UNIX. Everyone needs a little help here and there.

Anywho. My original shell was apparently "csh". Which I changed to "ksh" and so it was having trouble processing the .profile file as Tor-Arne put it. I then changed the shell to "sh", think that it was the original shell. But still the .profile was not being processed properly.

Now with Tor-Arne's help, I've restored the original "csh" shell. There are lots of variables being set in the ".cshrc" file.

Now the system behaviour is back to normal.
Taurian
Valued Contributor

Re: Revert chsh changes

Read Tor-Arne's post and my last comments for the solution.
Bill Hassell
Honored Contributor

Re: Revert chsh changes

Just to clarify the situation:

This user had a non-standard shell, csh in this case. That means that all the customization you required was never in .profile (the standard for POSIX and ksh) so all the suggestions would not work until you changed back to /usr/bin/csh as the shell.

So for any user that is runing csh, you should not change the shell until the user translates all the customized .cshrc commands into a .profile, something does require some experience. Otherwise, don't change the shell. This is why most sysadmins reject the use of csh (and relatives like tcsh) for use in Unix servers -- they are incompatible with standard shells.


Bill Hassell, sysadmin
Steven Schweda
Honored Contributor

Re: Revert chsh changes

> [...] This is why most sysadmins reject the
> use of csh (and relatives like tcsh) for
> use in Unix servers -- they are
> incompatible with standard shells.

"most"? Really? You took a survey? I've
noticed that Spanish is "incompatible with"
English (the "standard" language), too. Do
these "sysadmins" also "reject the use of"
Spanish (and relatives like Portuguese)? Do
they also reject the use of Fortran and
Pascal because they're incompatible with
standard C?

"Different" and "incompatible" are spelled
differently for a reason.