Cannot open Terminal

Discussion in 'macOS' started by dscuber9000, Feb 17, 2011.

  1. dscuber9000 macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
    #1
    I'm having trouble with a couple things on my MacBook Pro:

    - Can't open Terminal
    - When performing a back-up it gets around half-way done, then just stops with no alert or anything
    - Cannot partition hard-drive to set up Boot Camp

    Whenever I try to open up Terminal I get this message:
    [​IMG]

    I've Googled for help, but the most common recommended solution is to make sure my login shell is set to "/bin/bash" but it already is. Any help would be very much appreciated!
     
  2. The ArchAngel macrumors regular

    Joined:
    Jun 23, 2008
    #2
    Have you tried repairing permissions and checking the disk health with Disk Utility?

    I'd also consider maybe re-running the latest combo updater to see if that resolves the issue.
     
  3. dscuber9000 thread starter macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
    #3
    No I haven't, I didn't know there was an option like that. :D It's going to take 17 minutes, but I keep seeing things like "Terminal permissions repaired" pop up in the thing, so I'm assuming it is working.

    Edit: Repairing permissions didn't work, so I'll try the other things.
     
  4. The ArchAngel macrumors regular

    Joined:
    Jun 23, 2008
    #4
    So two things:

    -Definitely try re-running the combo updater.
    -See if you can open X11 and run /usr/bin/login from there. Just curious.
     
  5. dscuber9000 thread starter macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
    #5
    Just got done running the combo update and still no luck. :(

    In X11 I was able to log in and it told me the last time I logged in. Is that what I was supposed to see?
     
  6. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #6
    Please open X11. In the xterm window that appears, please enter

    Code:
    cat /etc/shells
    and post the output.
     
  7. dscuber9000 thread starter macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
    #7
    I tried that in X11 and it didn't show anything:

    [​IMG]
     
  8. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #8
    That's the problem. What do you get from

    Code:
    ls -l /etc/sh*
    entered into that xterm window?
     
  9. dscuber9000 thread starter macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
  10. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #10
    Okay, now we're in business. Enter

    Code:
    cat /etc/shells*orig
    and post the output.
     
  11. dscuber9000 thread starter macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
    #11
    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
     
  12. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #12
    Please enter the following:

    Code:
    sudo cp /etc/shells*orig /etc/shells
    in the xterm. Then try opening Terminal again.
     
  13. dscuber9000 thread starter macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
    #13
    I got some kind of error in X11: "[myname] is not in the sudoers file. This incident will be reported."
     
  14. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #14
    Oh, you don't have an admin account, do you?
     
  15. dscuber9000 thread starter macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
    #15
    I do, that's the frustrating thing. I just pulled up settings and my account, the only account on the Mac, is listed as Admin.
     
  16. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #16
    Now I'm thinking things are more messed up than I thought. If you're an admin, can you create a new admin account to temporarily work from (using the Accounts pane in System Preferences) ?
     
  17. dscuber9000 thread starter macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
  18. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #18
    So my guess is that Terminal won't open there either. In any case, open X11 in the new account and enter

    Code:
    sudo cp /etc/shells*orig /etc/shells
    You should be asked to supply the password for the new account you are using. If that happens, rather than you getting the error message you got on the old account, enter the password. Then logout of the new account, log in to the old one, and try opening Terminal.
     
  19. dscuber9000 thread starter macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
    #19
    No luck. It gave me that same error as soon as I entered the password.

    However, on the original account, I also had to enter the password, if that makes any difference.
     
  20. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #20
    By the way, did Terminal open in that new account?

    Well, you may as well delete that new account, by logging into you old account and going to the Accounts pane again.

    Not sure what's going on here. An admin user should be able to use the sudo command. Do you have any idea of what might have caused the problems you listed in your first post?

    I'm pretty sure I can get Terminal working, by having you boot into single-user mode and running that cp command. But I'm wondering if you really need to archive and reinstall the OS here.
     
  21. dscuber9000, Feb 17, 2011
    Last edited: Feb 17, 2011

    dscuber9000 thread starter macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
    #21
    No, Terminal didn't open in the new account either.

    My last back-up was January 14th so I'm guessing that's when whatever happened, happened. I didn't notice that I couldn't access Terminal until a week ago and didn't think much of it. But I found out today I can't even partition my hard-drive to install Windows 7, so that's really annoying.

    Edit: I tried running that command in single-user mode and it told me: "sudo: unknown uid: 0"

    Do you suggest restoring my Mac to Jan. 14?
     
  22. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #22
    Well, if you want to try to get Terminal to work ...

    1) Restart while holding command-s, to boot into single-user mode. You should get a black screen with white text, and a command line prompt sort of like in the xterm.

    2) At the prompt, enter

    Code:
    /sbin/fsck -fy
    This will run a check of your file system. It may take some time, but you should eventually get a message that ends "appears to be OK"

    3) At the prompt, enter

    Code:
    /sbin/mount -uw /
    This will mount the file system so that you can copy that file. There's no output from this command.

    4) At the prompt, enter

    Code:
    cp /etc/shells*orig /etc/shells
    There's no output from this command.

    5) At the prompt, enter

    Code:
    reboot
    6) Log in to your account and try Terminal again.
     
  23. dscuber9000 thread starter macrumors 6502a

    Joined:
    Sep 16, 2007
    Location:
    Indiana, US
    #23
    Terminal opened! Thank you so much! :D I'm running a back-up now so hopefully everything else works now too.

    Thank you for sticking with me! :p
     
  24. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #24
    You're welcome. Good luck.
     
  25. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #25
    Does this command give any error (after you type your admin password)?

    sudo -v

    [i.e., i don't see anything above which would have fixed the sudoers problem in post #13]
     

Share This Page