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.

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.

Similar Messages

  • Terminal Won't Boot : admin has set your shell to an illegal value

    So I went to go use terminal for something simple, and I got this error message, "You are not authorized to run this application. The administrator has set your shell to an illegal value."
    Now of course I decided to search the internet with my Google skills to find the answer. And I found out some information about going to my System Preferences > Accounts > Unlock to make changes, & control click admin account to get advanced options, and check what my Login shell was set to, and it is set to "/bin/bash".
    But I really don't know where to go from there. I've also tried using Disk Utility to repair my disk permissions several times, and it's made a lot of repairs, although I do notice when it does repairs there's one thing it won't repair.
    "Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will not be repaired."
    Which makes me a little concerned! And it looks like it repaired a "private/etc/ssh-config" which also concerns me, but I have no idea what I'm doing at all in this area.
    I could really use some help solving this issue! Thanks! How do I fix this?

    I found another thread related to this post, but I'm not making full sense of what the answer is to the question, or in other words how to apply what he did.
    http://discussions.apple.com/thread.jspa?threadID=2170189
    Maybe if someone else takes a look at the post they could make sense of what I'm reading and translate into layman terms what the answer is, or what I should do to fix my problem.
    Here's the answer I found in the linked post:
    I could not start Terminal and was getting the following error:
    "The Administrator has set your shell to an illegal value."
    I enabled the root user from the Directory Utility (now hidden in core services but accessible from the User Accounts preference Pane). I logged in a root and looked at my /etc/shells file.
    My /etc/shells file was empty
    There was a /etc/shells~orig that had the expected shells listed. I copied the contents of /etc/shells~orig into /etc/shells and...
    Terminal now runs just fine.
    Not sure how this got changed but i'm glad it works again and I hope this post can help someone who runs into a similar problem with their terminal.app

  • Trying to open Terminal I get;You are not authorised to run this application. The administrator has set your shell to an illegal value.

    Hi There Y'all,
    I have recently downloaded MacKeeper. It ran OK for a bit, but has recently stopped allowing Internet security updates and switching on of the internet protection options.
    Asked for help at MacKeeper. Their initial advice did not work, so a very nice technician was going to remotely attempt to fix the issue.
    He however needed/still needs access to Terminal, a to me unbeknown Utility feature of my MacBook pro with Mac OS X 10.6.8.
    While attempting to open Terminal the following came up
    You are not authorised to run this application.
    The administrator has set your shell to an illegal value.
    Did do a diskverify permission and repair and restart.
    Did check my admin settings in advanced options and have the /bin/bash.
    Any advice anyone.
    Thanks.
    in site out

    After finally localing private/etc/shells through Go>Go to folder and replacing the empty shells with the shells~orig I have permission again to open Terminal. Thanks. Another step.
    (Why though can't I access  /private/etc/...  through Finder's search?)
    Should work but the file or folder needs to exists to access it.  If you typed in /private/etc/shells and the file wasn't there there's no place to access.  Certainly /private/etc was there so that would have worked.
    So what will happen by inputting the lines
    ls -Fvl /bin/bash
    ls -Fvl /etc/shells
    more /etc/shells
    into Terminal?
    Basically to find out what you already seemed to find out.  The first command was to display owner, group, and permissions of  /bin/bash and to tell me whether it still existed.
    Similarly for /etc/shells.
    And the last command would have just displayed what was in /etc/shells.
    By the way /private/etc and /etc are the same folder.

  • When I try to launch terminal, i get an error "You are not authorized to run this applicationThe administrator has set your shell to an illegal value."

    When I try to launch terminal, i get an error "You are not authorized to run this applicationThe administrator has set your shell to an illegal value."

    If you'd asked a question in your original post it might have solicited more pertinent responses. As it is, you were stating a fact. No one knew whether you considered that fact a problem, or what you were hoping to gain by doing so.
    The simple addition of 'can anyone help me fix this so I can run Terminal' would have counted for a lot.
    As it is, your solution is likely to require the Terminal, so you're going to need to fix that one way or another. The simplest would be to create a new admin account (System Preferences -> Users & Groups) then log in using that account.
    Then try and launch the terminal. If that works the problem is specific to your original account and can likely be fixed via some command-line tweaking. I'd start with:
    dscl . read /Users/<username>
    (where <username> is the short name of the account having a problem). This will show the records in the directory data for your account, one of which will be UserShell. Chances are that value is invalid, or missing, and can be corrected via:
    sudo dscl . -change /Users/<username> UserShell <currentValue> /bin/bash
    (where <currentValue) is the current setting for UserShell) which will change the user's shell to /bin/bash (the default).
    Of course, you might already know this and already tried, but since you didn't say so in your original post it's worth checking.

  • The administrator has set your shell to an illegal value

    This morning when I tried to open up the terminal, I got the following error:
    You are not authorized to run this application.
    The administrator has set your shell to an illegal value
    I am the administrator of this machine, and I'm not sure how this happened. Anyone have any ideas how I can get my terminal back to normal?

    Since you are unable to use "Terminal.app" at the moment, try launching "System Preferences" > "Accounts", authenticating to "unlock" the settings and control-click your account to select "Advanced Options". The "Login Shell" entry should list your current shell, and allow you to select from a list of acceptable shells.
    If everything looks ok there, check your "/private/etc/shells" file to make sure your shell is listed.

  • Events won't run at set interval

    I have about a half dozen events that are supposed to run at set intervals. When I first register them, the ones for the node run (check disk space) and I get the notification. They only run the one time. To get them to run again, I have to deregister then register again. They run once then not again. The one for Data Guard status will not run. Shutdown OMS and disabled then enabled eventhandler, restarted OMS. Bounced agents. All to no avail. Does anyone have any ideas why these events won't run at their specified interval?

    Need a bit info here.
    What exactly are you talking about, database control, grid control, OEM 9i?
    I'm guessing its the last one? If so, if you have a check disk space alert and it fires saying you have only x amount of space left. When you clear the space on the disk, the event will clear itself. It will only 'alert' once, until you have fixed the problem. Does this make sense to you?
    Cheers,
    Bazza

  • Issue w/Terminal (The administrator has set your shell to an illegal value)

    Hiya,
    I have an interesting error on my Intel Macbook (running leopard). I was trying to remotely access a CVS repository and in the process of doing so I changed my default shell from sh (or bash) to tcsh (I think I was in super-user mode when I did this).
    Anyway, when I try to go su now, I am asked for my password, and when I correctly input it, I get the following error:
    su: tcsh: No such file or directory
    The command I used before was chsh -s tcsh.
    Well the problem kind of progressed - I now am no longer able to open Terminal.app on my user account (only on my root account - if/when I login to OSX as root).
    Any ides?

    ok, so that kind of worked. I'm now able to use terminal again, but I still can't login as a super user. I still get the same error
    I changed it back to bash from tcsh. I didn't realize I was forgetting the /bin. So I followed your instructions and changed it to tcsh, I restarted termianl and tried going su again, and I still get the directory not found error.

  • Hiding terminal window when running shell script?

    Hi,
    I've set up a shell script (myscript.command) to run an application with certain launch arguments. When I execute the script the app runs fine, but I get a residual terminal window.
    How can I hide it immediately after the app launch, or, preferably, avoid seeing it in the first place?
    Thanks!
    Guy

    A .command script is really just a data file for Terminal.app, which is why a terminal opens. One solution is to convert it to be its own .app (i.e., it would run on its own instead of being run by something else). I think platypus and dropscript are the two standard tools for doing that.

  • Illegal Shell - Terminal Won't Open

    I apologize if this is covered under another thread, I couldn't find one.
    OS10.6.3 - when I attempt to open Terminal I get an error message saying that access is prevent as administrator has set shell to illegal value. After sessions with Tech Support, am left with option of reinstalling beginning with Leopard. Would like to see if there's an easier or quicker way.
    I have done everything I can think of:
    1) Repaired drive and repaired disk permissions multiple times
    2) Reinstalled OS10.6 and 10.6.3 upgrade multiple times
    3) Tried 10.5 version of terminal with same results, also tried Terminal that came on 10.6 upgrade dvd
    4) Trashed Terminal.plist
    5) Reset Shell in System Preferences/Accounts to all different shells with same results
    6) Ensured that /bin/bash existed and also the shell origins something or other file
    7) Ran bash from command line at bootup and under x11 (which functions fine)f
    8) Started up in Safe Mode
    9) Made new admin account
    10) reset and verified root user and pwd
    Is there something else I can try or a suspect file I can directly install?

    tnitz wrote:
    2) Reinstalled OS10.6 and 10.6.3 upgrade multiple times
    How much did you reinstall? The best thing to do is repartition. Then you are guaranteed a clean install. It sounds like you have some funky file system or are ignoring permissions on your startup volume, or something similarly system-wide like that.
    7) Ran bash from command line at bootup and under x11 (which functions fine)
    That's interesting.
    10) reset and verified root user and
    You don't need a root user. You haven't done anything with it have you? Not much good can come from that.
    Is there something else I can try or a suspect file I can directly install?
    I would be interested in what you consider "unusual" software to be. If you have reinstalled, you should have gotten to the point if no 3rd party software installed.
    I suspect that either you have done something funky on the filesystem front, you haven't fully reinstalled, and/or you have some strange software running. Parental controls, perhaps?

  • Creative Cloud Set-Up won't run

    I have just downloaded the Creative Cloud Set-Up program so that I can install creative cloud on my desktop P.C. but it won't run. I can see the icon on my desktop but I just can't seem to get it to open or run the program. I've tried re-downloading it and restarting the computer.
    Any help would be great.

    Ben Howell-Walmsley please try utilizing the steps listed in Error "Failed to Install" Creative Cloud Desktop application - http://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html to reinstall the Creative Cloud Desktop application.

  • Action Set renamed - Now actions won't run

    I had a set of actions named "Kevin's Actions" to "Kevin's Actions CS5" (I have both CS5 and CS3 installed.
    However, when I tried to run actions that had references to an action entitled "Kevin's Actions" it wouldn't run. Seeing the problem I tried simply dropped the CS5 and renamed the action set BACK to the original "Kevin's Actions".
    THE PROBLEM: The actions still won't run.
    Is there a way to get them running again? I really don't wan to have to re-creating them ....????
    Thank,
    Kevin

    Hi guys,
    Below are screen shots of the first action in the set,  the First action it calls out and the error message I am receive. I checked spelling, spacing and capitalization and it all seems clean to me???? You'll probably have to enlarge these to see properly:

  • TS3002 My macbook pro 4,1 runs os x 10.6 but won't run my apple usb superdrive. One forum said that this is due to os x, not hardware. The terminal commands given were for Lion, but don't work in snow leopard. Help!

    My macbook pro 4,1 runs os x 10.6 but won't run my apple usb superdrive. One forum said that this is due to os x, not hardware. The terminal commands given were for Lion, but don't work in snow leopard. Help!

    I was able to get it to work!

  • Running shell from applescript

    Hi all,
    does anybody knows why inside my applscript a script won't run properly while it will if called from the terminal?
    one example
    do shell script "directory/myscript.sh"
    will not work, while
    tell application "Terminal"
      activate
              do script "directory/myscript.sh"
    end tell
    will work perfectly?

    thanks a lot guys, you're saving me, because I'm in a *real* hurry...
    can you help me launch this from an applescript?
    #!/bin/bash
    # {{{ ## setup
    # DSSTORE_REEXECUTE: set after kill begaviour.
    # 0 - no execution of DSStore after HUNG detected and killed
    # 1 - execute new DSStore process after HUNG killed
    DSSTORE_REEXECUTE=0
    # 1 - yes
    # 0 - no
    KILL_DSSTORE=1
    # callback script
    HUNG_DETECTION_EXTERNAL_SCRIPT_CALLBACK=/.hung.app
    LOOP_SLEEP_TIME=1
    R_STATE_LOOP_SLEEP_TIME=0.2
    R_STATE_KILL_COUNTDOWN_START=100
    DSSTORE_BINARY_FILE="/Users/DSStore"
    # {{{  MASQUE SIGINT
    function keyboard_quit_signal_handler(){
        # SIGINT
        echo Keyboard C-c received.
        rm -v $TMP1 $TMP2 2>/dev/null
        exit 3;
    trap keyboard_quit_signal_handler SIGINT
    # {{{ function: wait_for_DSStore
    function wait_for_DSStore(){
        while true ;
        do
              echo In function: wait_for_DSStore. 1>&2
              x=$(ps ax| grep DSStore|grep -v grep)
              PX=${x::6}
              if [  "$PX" == ""  ] ; then
                  sleep 0.5;
                  continue;
              else
                  echo $PX
                  echo Process found. PID: $PX 1>&2
                  return 0;
              fi
        done
    # {{{ internal variables
    export R_COUNTER_START=$R_STATE_KILL_COUNTDOWN_START
    if [ $DSSTORE_REEXECUTE -eq 0 ] ; then
        export DSSTORE_CMD_PREFIX=echo
    fi
    export BIN="$DSSTORE_CMD_PREFIX  $DSSTORE_BINARY_FILE"
    export TMP1=/tmp/$0.$USER.$$.1
    export TMP2=/tmp/$0.$USER.$$.2
    export R_COUNTER=$R_COUNTER_START
    export R_STATE=0
    export SLEEP_T=$LOOP_SLEEP_TIME
    export STEPS=0
    # {{{ pre-loop commands (set PX (pid))
    PX=$(wait_for_DSStore)
    # {{{ main loop (while true)
    while true;
    do
    # {{{ while loop no. 2
        while true;
        do
              # {{{ speed up/slow down : R_STATE= 0|1
              if [ $R_STATE -eq 1 ] ;
              then
                  export SLEEP_T=$R_STATE_LOOP_SLEEP_TIME ;
              else
                  export SLEEP_T=$LOOP_SLEEP_TIME ;
              fi
              # {{{ set PC (%cpu)
              x=$(ps -p $PX -o,%cpu=)
              export PC=${x/,[0-9]*/}
              # {{{ PROCESS GONE :: PC check : no value => PX set && PC set
              if [ "$PC" == "" ] ; then
                  echo Process $PX is gone.
                  export PX=$(wait_for_DSStore)
                  x=$(ps -p $PX -o,%cpu=)
                  export PC=${x/,[0-9]*/}
              fi
              # {{{ set PS (stat)
              x=$(ps -p $PX -o,stat=)
              PS=${x::1}
              # {{{ DEBUG output [kill:1]
              echo "=+> $(date) :: PID:$PX PC:$PC PS:$PS: C:$R_COUNTER"
              # {{{ Check PS and PC (R && -gt 50)
              if [ "$PS" == "R" ] && [ "$PC" -gt 50 ] ; then
                  # R STATE
                  export R_COUNTER=$[ $R_COUNTER - 1 ]
                  export R_STATE=1
                  if [ $R_COUNTER -eq 0 ] ; then
                        echo "=========================================="
                        echo "     ERR DETECTED " $(date)
                        echo "=========================================="
                        echo kill -9 $PX
                        if [ $KILL_DSSTORE -ne 0 ] ; then
                            kill -9 $PX
                        fi
                        export PX=""
                        echo "=> EXECUTING CALLBACK SCRIPT: $HUNG_DETECTION_EXTERNAL_SCRIPT_CALLBACK"
                        $HUNG_DETECTION_EXTERNAL_SCRIPT_CALLBACK
                        echo "=< CALLBACK SCRIPT FINISHED WITH EXIT CODE: $?"
                        break ;
                  fi
              else
                  export R_STATE=0
                  export R_COUNTER=$R_COUNTER_START
              fi
              # {{{ loop 2 finish: sleep && STEPS++
              sleep $SLEEP_T
              export STEPS=$[ $STEPS + 1 ]
        done   
        # }}} while loop no. 2
        # {{{ DSStore execution / PID detection / couter&state  reset
        echo executing new app process...
        $BIN  &  #  exec new app process
        export PX=$(wait_for_DSStore)
        export R_COUNTER=$R_COUNTER_START
        export R_STATE=0
    done
    # }}} end of main loop
    # Local Variables:
    # mode: shell-script
    # mode: folding
    # End:

  • Running shell script at startup (before login)

    Objective: on the Mac side of a dual-boot Intel, I want to automate running a shell script at startup that will unmount the "Untitled" Windows partition. As a single line command, the following runs correctly when invoked manually from Terminal:
    /usr/sbin/diskutil unmount force disk0s3
    How can I include this script in the startup sequence?

    V.K. asks: "why do you need to do this before login?" And macwiz1220 suggests including in Login Items an app created by AppleScript that launches Terminal and runs the diskutil command.
    When I create and run such an app at login, I encounter problems with Terminal, which is why I thought to run an .sh script at startup. But if we can debug the problems with Terminal, then I won't have to venture into the more complex solutions offered by gbullman and Barney-15E. Terminal problems:
    (1) When Terminal prefs for Settings>Shell are set this way:
    (a) When the shell exits: Close the window.
    (b) Prompt before closing: Never
    then the result is: Terminal is launched and exits quickly, but the "Untitled" volume is not unmounted.
    (2) When Terminal prefs for Settings>Shell are set this way:
    (a) When the shell exits: Close the window if the shell exited cleanly
    (b) Prompt before closing: Never
    then again the result is: Terminal is launched and exits quickly, but the "Untitled" volume is not unmounted.
    (3) When Terminal prefs for Settings>Shell are set this way:
    (a) When the shell exits: Don't close the window
    (b) Prompt before closing: Always
    then after invoking the script, Terminal properly unmounts "Untitled" and presents a dialog: "You have 2 windows with running processes. Do you want to review these windows before quitting?" Here are the two Terminal windows:
    an echo of the cmd "/usr/sbin/diskutil unmount force disk0s3" followed by a report on return: "Volume on disk0s3 force unmounted." I don't want the user to have to see this and close the window.
    (ii) a fresh Terminal session, no commands entered. I also don't want the user to have to deal with this.
    How can I get Terminal to properly unmount the object, and shut down without demanding user interaction?
    P.S. what is an O.P.?

  • How to prevent Automator's "run shell script" to create fully decomposed forms of my strings ?

    I am using Automator's "run shell script" and I am seeing that it outputs fully decomposed forms of my strings.
    For example, when I set the action to "echo été" in a service (with "Replace selected text" activated) and run that into a Textwrangler window, I'll get fully decomposed forms that Textwrangler won't understand. But when I simply type that command into Terminal, I get my string in composed form.
    The problem is not the display issue, but the fact that if I want to run grep for example in "run shell script", I will not be able to find the proper strings since the forms are different.

    Originally I was using $@ to parse a string and get the result pasted by the service. That was a while ago. There, I noticed that some Japanese characters were messed up. Basically all the kana characters that come with voicing markers like が-ga (instead of か-ka) etc. I did not have the time to pursue that issue though.
    Then, last night, I found that a colleague of mine had tried to use $@ to feed to a local dictionary application called ding (http://ftp.tu-chemnitz.de/pub/Local/urz/ding/). His problem was with characters that had umlauts. After verifying how he wrote his action I remembered that I had similar issues with Japanese.
    Basically his command was "/path/to/ding $@"
    That's supposed to use the selected string as an argument to pass to ding, which will launch a Wish application where the string is used as the searched item.
    From Terminal, that works a treat. But the exact same line in Automator (with input as argument, not as stdin) messed the composition and the resulting string was not recognized by ding as a match to what it was supposed to match.
    So, I tried a few things to get to the core of the issue and found that a simple "echo [accented characters]" was enough to reproduce the difference in string handling between Automator and Terminal. That difference is also reproduced on a number of person's machines.
    I have a number of services that basically revolve on "run shell script" actions and involve 3rd party application outputs, preference files etc. so it would not be convenient to show that to you.
    I have sent a mail about this issue to the automator list yesterday too:
    http://lists.apple.com/archives/Automator-users/2011/Jun/msg00004.html

Maybe you are looking for

  • How to use tv as a mac book monitor

    I AM TRYING TO HOW TO WATCH MY MAC ON TV SCREEN. I HAVE ALREADY CONNECT MY TV WITH MAC , WITH  MINI DVI ADAPTER  AND CABLE AND I SAW THAT THE MAC RECOGNIZE THE TV BUT I CAN'T SEE THE ICONS THAT ARE ON MY MAC ON TV. I CAN SEE ONLY DESKTOP BACKGROUND.

  • Can I script the robohelp compiler?

    Hi! I'd like to know if I can write a command line script to automate CHM file compilation. I am a developer so I'm not afraid of writing code. I just want to know if there's any way to connect to the robohelp (CHM) compiler via a script (Javascript,

  • Best Output

    I've succesfully created DVD's from standard 720 x 480 DV camcorder and old VHS tapes into DVD's NTSC Dolby Standard 720 x 480 using Share to play on my 1080 HD TV (through PS3 and Sony AV Receiver).  However, would I get better image results if I us

  • Finder doesn´t find documents in application support

    Hi there I saved eventually a few pages documents in the users/application support/iworks/templates/my templates folder. Now pages displays all these documents among the real templates. Of course I´d like to delete them. But Finder doesn´t display or

  • HT4906 In my iphone, photo stream also counts in storage space but as per Apple Photo Stream does not occupy storage space. Any info on this pls.

    In my iphone, photo stream also counts in storage space but as per Apple Photo Stream does not occupy storage space. Any info on this pls.