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

Terminal won't run - shell set to illegal value

On my iMac running 10.6.8, I've found I'm unable to run Terminal. My account has full administrator privileges, or should, anyway.


First, I made sure my specific account had read & write privileges to the app itself, dragged Terminal's preferences file out of my Library, repaired permissions, and logged in and out. That didn't work.


Then I tried working off of a solution I found elsewhere: I unlocked Accounts in System Preferences and tried right-clicking my account to access Advanced Options so I could check out the login shell field, but it didn't give me a right-click dropdown at all. Am I right in supposing my account's shell is set to /dev/null? Either way, I'm stymied on how to to fix this, and any recommendations are welcome.

iMac, Mac OS X (10.6.8)

Posted on Mar 21, 2012 8:24 AM

Reply
22 replies

Mar 21, 2012 7:16 PM in response to Frank Caggiano

Frank Caggiano wrote:


Do you get the advanced option menu i while logged in as yourself you click on any other account?


Yes, it came up just fine for the secondary account. That other account also has administrative privileges — I'm not sure if that info's relevant, but just in case, haha.


Austin Kinsella1 wrote:


> Am I right in supposing my account's shell is set to /dev/null?


If it is, it shouldn't be. Open System Preferences/Accounts, click the padlock and enter your password then right-click your account to bring up the advanced options. You should see the login shell settings - the default is /bin/bash


I've tried this, and it unfortunately had no effect, as mentioned above. I also checked out /private/etc/shell and compared the contents with what others said should be in there, and the problem doesn't appear to be there, either.


BobHarris wrote:


It may be necessary to delete the Terminal preferences.


Finder -> Go -> Go to Folder -> /Users/yourShortUsername/Preferences


then drag the file com.apple.Terminal.plist into the trash.


It is possible to specify a different shell, or a wrong shell via the Terminal's preferences.


Tried this, too, also to no effect.

Mar 21, 2012 9:00 PM in response to Jandalf

The fact that bash launches successfully in other accounts tells me there is nothing wroing with bash and its related system files (e.g., /etc/profile).


You've checked that the Account's default shell is /bin/bash.


You wiped out the shell's plist so it would create a fresh new one.


The only thing I haven't seen you check is the various shell startup files:


~/.bash_profile

~/.bash_login

~/.profile

~/.bashrc


See if something weird is going on in the ones that are there (assuming some are indeed there).


I also checked out /private/etc/shell and compared the contents with what others said should be in there, and the problem doesn't appear to be there, either.


Just to make sure here. I hope you just had a typo in that statement and meant /private/etc/shells. It should look something like this:

# 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

Although I don't think it matters whether this file exists or not at the time bash is launched.

Mar 22, 2012 6:37 AM in response to Jandalf

I agree with X423424X, that you need to look at the shell initialization files, as mentioned.


You can also try using iTerm.sf.net, which is an alternate terminal emulator. If it behaves the same (or similar) to Terminal, then it strongly indicates something related to initialization files.


If iTerm works, then it ports to something specific to Terminal.

Mar 22, 2012 7:42 AM in response to Linc Davis

Sorry about that, X423424X, that was indeed a typo. It was /private/etc/shells that looked exactly like the example you pasted.


I looked for the shell initialisation files, but could not find them in my home folder, or the other account’s home folder for that matter.


iTerm isn’t working properly, either, though in a different way. It appears to run and gives me the typical top-left menu, and I can pull up its preferences and everything, but when I try to make a window appear, it flickers and disappears a split second later.


When I logged into the other admin account, my original account didn’t appear at all in System Preferences. So I ran the command you supplied, Linc Davis, and it gave me this:


<dscl_cmd> DS Error: −14136 (eDSRecordNotFound)

Mar 22, 2012 8:19 AM in response to Jandalf

OK so if that account isn't showing up in Users & Groups and the dscl command is given you Record not found basically the system is telling you that that account does not exist.


And you say you are able to log in from the log in screen into this account? And when you do you can use it normally? Is there anything strange or out of the ordinary about your install that you haven't mentioned?


I'm at a loss, Linc should have something.

Terminal won't run - shell set to illegal value

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