Terminal Error shell has illegal value

Discussion in 'MacBook Pro' started by thewright1, Nov 6, 2011.

  1. thewright1 macrumors regular

    thewright1

    Joined:
    Apr 3, 2008
    #1
    Hi All,

    I've never had an issue opening Terminal until I upgraded to Lion about a week ago and when I try to launch the terminal, I get the following error "You're not authorized to run this application, shell has illegal value" (screenshot). I seen some posts dated back to 2009 but nothing is working for me. Any ideas?
     

    Attached Files:

  2. Prodo123 macrumors 68020

    Prodo123

    Joined:
    Nov 18, 2010
  3. thewright1 thread starter macrumors regular

    thewright1

    Joined:
    Apr 3, 2008
    #3
    I tried that, no luck =(
     
  4. SmoothJ macrumors member

    Joined:
    Oct 19, 2010
    #4
  5. thewright1 thread starter macrumors regular

    thewright1

    Joined:
    Apr 3, 2008
    #5
    Thanks for the response. I checked out the link, and it showed me how to show my current shell, but it didn't tell me what my current shel should be. Right now it appears to be

    Code:
    /bin/bash
     
  6. thewright1 thread starter macrumors regular

    thewright1

    Joined:
    Apr 3, 2008
    #6
    I just did a comparison with my computer at work and it looks like /bin/bash is correct and I tried repairing permissions but still no luck. Is there something else that anyone knows of that i can try?
     
  7. yawns macrumors member

    Joined:
    Oct 12, 2011
    #7
    The link from the Apple board mentions /private/etc/shells. That file has a list of "allowed" shells. Have you checked that file? Mine looks like this:

    Code:
    # 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
    I also have /etc/shells. Both of my files look the same.

    Ironically, the easiest way to check this stuff is probably with a terminal. You can possibly get to one directly by opening Finder, hitting command+shift+g, and the going to /bin. From there you can double-click bash to launch it (unless the permissions issue stops you -- not sure).

    From there, you can do

    cat /etc/shells
    cat /private/etc/shells

    to check the files' contents. If you need to edit them,

    sudo nano /etc/shells
    sudo nano /private/etc/shells
     
  8. thewright1 thread starter macrumors regular

    thewright1

    Joined:
    Apr 3, 2008
    #8
    Problem Solved

    I found this solution on another website and it worked for me:

    • Use Go > Go to Folder to go to "/private"
    • Select "etc"
    • Command-I to bring up the Information pop-up (don't close it again till the end of this procedure)
    • Click the lock symbol in lower right corner to unlock permissions
    • Make a note of the permission setting for "Everyone"
    • Click the permission setting for "Everyone" and select "Read & Write"
    • Use Go > Go to Folder to go to "/private/etc"
    • I found that "shells" was empty, but there was a "shells~orig" with a good list of shells in it
    • Delete "shells"
    • Select "shells~orig"
    • Command-C, Command-V to copy-and-paste it; this creates "shells~orig copy"
    • Select "shells~orig copy
    • Click again to enter rename mode and change name of "shells~orig copy" to "shells"
    • Return to the Information pop-up and change the permission setting for "Everyone" back to its original value
    • Close the Information pop-up
    • Restart computer
    • Enjoy Terminal!

    Thanks a TON everyone for your help on this. Much appreciated.
     

Share This Page