Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can't Open my Terminal

Whenever I try to run the terminal, I get this error message.


You are not authorized to run this application.

The administrator has set your shell to an illegal value.


Just in case you're wondering, yes, I am logged in as the administrator.


I have been having some issues with priveleges ever since I reinstalled my OS and loaded my info from a Time Machine Backup, so this might be related, but I still have no idea how to fix it.

MacBook Pro, Mac OS X (10.6.8)

Posted on Apr 26, 2012 3:47 PM

Reply
14 replies

Apr 26, 2012 4:09 PM in response to Christian Larsen

Open System Preferences > Accounts, authenticate and control-click your account. You should see a dropdown menu with "Advanced Options". It will present a list of available shells.


Another alternative is to download a free Terminal app and use it to change your shell to what you want (bash, I assume).


This may not fix your permissions problem. If you're still having problems write back.

Apr 27, 2012 5:53 AM in response to Christian Larsen

If you already have a valid shell, then maybe /etc/shells is corrupt? It should read


# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.


/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh


If that is good, then perhaps the Terminal preferences are corrupt, try deleting


Your Home Folder -> Library -> Preferences -> com.apple.Terminal.plist


Try downloading a experimenting with iTerm.sf.net (an alternate terminal emulator).

Apr 27, 2012 2:30 PM in response to Christian Larsen

Christian Larsen wrote:

And here are the ownership and permissions from my system


-rw-r--r-- 1 root wheel 179 Oct 5 2009 /etc/shells


I'm not quite sure what I could do with that information.


If the /etc/shells file does not have proper ownership and proper permissions, it will be ignored. So I gave you that information because you will need to make sure the file you provide has ownership and permissions like above.


Also, I just found a file called shells~orig, which has the same contents as you posted above for a typical shells file. Does that mean anything?

It means something renamed the /etc/shells to /etc/shells~orig and then did not put in place a working /etc/shells. I do not know what did this.


All I can tell you is if you want a working Terminal session, you MUST HAVE a valid /etc/shells file that lists at least the shell you want to use when you start a terminal session, and ideally it should list all the shells I have posted above, and is currently in your /etc/shells~orig


You can rename /etc/shells~orig to /etc/shells and that should do it.


Finder -> Go -> Go to Folder -> /etc


Use finder to rename shells~orig to shells


You will most likely be told you need to use administrative privileges.


Again, if you have a backup, such as Time Machine, Carbon Copy Cloner, SuperDuper, etc..., you could try restoring from your backup.

Bottom line. If you want to use a Terminal session, you must have a valid /etc/shells and it should look like what I have posted above or what is in your /etc/shells~orig. Without that you cannot use the Terminal.

Apr 27, 2012 2:36 PM in response to BobHarris

Thanks dude, I used the Time Machine to restore shells from a backup. Now, another, possibly related, possibly unrelated question. In my /etc folder, most of the files have a duplicate appended with ~orig or ~previous. Could this point to a bigger problem that I just haven't noticed yet? If so, would I be better off replacing the entire folder with a backup from my time machine? I'm thinking yes, but I want to check if there's any risks involved.

Apr 27, 2012 4:23 PM in response to Christian Larsen

On one of my older systems I have a few ~previous and ~orig files, but I also have the same named files without the ~orig or ~previous. So I would say this is a standard way to modify a /etc/ configuration file saving the previous value.


If you have the same file name without the suffix, then I would say you are fine. It is only in situations where you either do not have the file without the suffix and/or the file is empty that you have to worry.

Can't Open my Terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.