Today I was mucking about trying to uninstall macports when I noticed an error being thrown up whenever I used sudo. I killed Terminal and tried to restart it which failed with the error message "You're are not authorized to run this application" and "The administrator has set your shell to an illegal value." How can I fix this?
|
If you are getting some strange error messages in your Terminal windows when they first open, that likely indicates a problem with your Terminal preferences. Try removing (or just renaming) the Terminal preferences file ( If you still have a problem, then look at what you have in your shell dot files: Another place to look for problems is the If all that fails, use Disk Utility to repair the permissions for Terminal. (Source) |
|||||||||
|
If repairing permissions clears up the problem, the cause is (almost certainly) that the permissions of
More rarely, some people have encountered this problem when the To answer your original question: If Terminal complains about an “illegal shell” it means that the shell for your user account was not found in You can see which shells are considered valid with You can check which shell your user account is set to use with
The Advanced Options sheet displays detailed user account information including the shell pathname. You can also use this to edit the shell pathname to re-enable logins if it has been set to a value not listed in |
||||
|
|
|
I use zsh, while in the settings don't know why $SHELL is set to |
|||
|
|
|
For me, I received this error because of a chsh typo as well. I use homebrew and (very stupidly) set my shell to the binary in /usr/local/Cellar rather than the dynamic link in /usr/local/bin. As a result Terminal gagged but surprisingly, iTerm did not. This thread was quite helpful for fixing my problem. To prevent my problem: if you use homebrew, ALWAYS reference the dynamically linked binaries in /usr/local/bin, for these will always be kept up to date. |
|||
|
|
I got this error after I ran chsh and made a typo in the path for the login shell. Nothing happened when I tried to show advanced options in Users & Groups. I was able to run chsh again with iTerm though. Another way to change the login shell is to use dscl. |
||||
|
|
