Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an issue with Terminal on MacOS X 10.7.4. I know where it comes from, but I don't know how to solve it :

Yesterday, I installed fish-shell as a shell replacement. Following the installation instructions, I ended typing the following command :

chsh -s /usr/local/bin/fish

I noticed I had to do a :

sudo bash

for it to work. Once done, I quit.

Today, I try to run Terminal and I see te following message :

Last login: Wed Jun 27 12:38:01 on ttys000
login: /usr/local/bin/fish: Permission denied

[Opération terminée]

(yes, I'm French, which explains my poor English). I cannot type any command since I have no access to the Terminal. I tried with iTerm2 but same issue.

No command is set at launch in the default profile of Terminal/iTerm2 (well, in the UI).

How can I take the power back ?

Thank you.

share|improve this question

migrated from stackoverflow.com Jun 27 '12 at 14:32

This question came from our site for professional and enthusiast programmers.

1  
Note that if you get stuck without a shell, you can use Shell > New Command and enter the name of a different shell, e.g., bash, and Terminal will use that shell instead of whatever the shell is set to (make sure that “Run command inside a shell” is not selected). Then you can use that shell to resolve the problem with the other shell, or change the default shell back with sudo chsh -s /bin/bash (or whatever shell you prefer). – Chris Page Jun 29 '12 at 13:19
up vote 4 down vote accepted

In System Preferences, open the Users & Groups section, right-click on your user and select Advanced Options. You can change your Login shell setting there.

share|improve this answer
    
Thank you, problem solved. – Jon Jun 27 '12 at 12:06

If you get stuck without a valid shell, you can use Shell > New Command and enter the name of a different shell, e.g., bash, and Terminal will use that shell instead of the default (make sure that “Run command inside a shell” is not selected).

Then you can use that shell to resolve the problem with the other shell, or change the default shell back with sudo chsh -s /bin/bash $LOGNAME (or whatever shell you prefer).

share|improve this answer

First use Shell > New Command then use another shell (like C shell csh); then use the following command to change the permission:

sudo chmod +x  /usr/local/bin/fish
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .