Find the answer to your Linux question:
Results 1 to 4 of 4
I changed shells for a user from bash to tcsh using this command... chsh user -s /bin/tcsh but when logging on via ssh under that user i get a "Illegal ...
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Location
    Iowa
    Posts
    4

    changing shells

    I changed shells for a user from bash to tcsh using this command... chsh user -s /bin/tcsh but when logging on via ssh under that user i get a "Illegal variable name" error...i type, echo $shell and it says, /bin/tcsh. I am curious what that Illegal variable name could be.

    All i did was change shells, never had this problem before. Anyone have a clue what is causing this? Thanks.

  2. #2
    Linux Guru
    Join Date
    May 2011
    Posts
    1,843
    What version of Linux are you using?

    Does the entry for the user in /etc/passwd look right (particularly the last field)?

    Does logging in locally (in a virtual term, etc.) cause the same error?

    Anything in /var/log/messages or /var/log/secure?

    Does ssh -v tell you any more?

    No idea if it matters in the case, but is SELinux enabled? (getenforce)

  3. #3
    Just Joined!
    Join Date
    Mar 2008
    Location
    Iowa
    Posts
    4
    Quote Originally Posted by atreyu View Post
    What version of Linux are you using?

    Does the entry for the user in /etc/passwd look right (particularly the last field)?

    Does logging in locally (in a virtual term, etc.) cause the same error?

    Anything in /var/log/messages or /var/log/secure?

    Does ssh -v tell you any more?

    No idea if it matters in the case, but is SELinux enabled? (getenforce)
    I use cpanel and their latest version messed things up so i had to delete the /etc/profile.d/localib.csh file and that solved the issue.

  4. #4
    Linux Guru
    Join Date
    May 2011
    Posts
    1,843
    ah, and so anyone with a csh/tcsh shell who logged in would source all /etc/profile.d/*.csh scripts, and that localib.csh script must have had a bad variable assignment in it. glad you figured it out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...