Why do I get this error message when trying to use Terminal on my Mac?

U.N. Owen April 21, 2010
Pinterest Stumbleupon Whatsapp
Ads by Google

I’ve always owned Macs. However, for the past 10 years, I didn’t have one. I knew System 6-9 like the back of my hand. I’ve had OSX (Snow Leopard) since past September. I’m a pretty fast learner, but there are some things that I’m not used to yet.

One prob that’s driving me nuts is – I need to use Terminal. Every time I launch it, I get this message; ‘administrator has set your shell to an illegal value.’

Any ideas what I should do?

Danke.

  1. zazen.info
    April 30, 2010 at 11:11 am

    In some cases, your account is deleted in sudoer File too, although you have admin rights. Then sudo wont work. Enable (temporary) root access:
    http://snowleopardtips.net/tips/enable-root-account-in-snow-leopard.html
    Login with su and try to edit the shells File again.

  2. Johnathan TheTool Lane
    April 22, 2010 at 2:39 pm

    The problem is that the OS maintains a list of valid shells in "/etc/shells":

    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

    If you try to change your shell with the "chsh" command to a shell not on this list, it will simply refuse to do so. Brute force changing it with NetInfo will cause Terminal.app to break. If you change your shell back to "/bin/bash" in NetInfo, you can then use "sudo nano /etc/shells" to edit the list of valid shells, adding, for example, the the MacPorts version of BASH:

    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
    /opt/local/bin/bash
    /bin/csh
    /bin/ksh
    /bin/sh
    /bin/tcsh
    /bin/zsh

    Once you have added whatever shells you want to the list, you can run "chsh -s /opt/local/bin/bash" (or "chsh -s ") to switch shells, without breaking Terminal.app.

    NOTE: IF YOUR SYSTEM HAS MULTIPLE USER ACCOUNTS AND ONLY ONE IS EFFECTED THEN THIS IS MOST LIKELY NOT YOUR PROBLEM.

    If thats the case then it's probably not anything in /etc that's causing it, but more likely ~/.profile, ~/.bash_profile, ~/.bashrc, or some other hidden file in the User account.

    TextWrangler, with its "Open Hidden file" menu item, is a great way to browse through hidden text files and modify them if necessary.

    Good Luck

  3. Urza
    April 21, 2010 at 9:01 pm

    Check your /private/etc/shells file and make sure it contains the following:

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