Currently Being ModeratedMay 8, 2012 5:09 PM (in response to Sami Cooyar)
Create a new administrator account in which to change your shell and also fix the sudoers file, which is apparently corrupt. It should have the following content:
# sudoers file. # # This file MUST be edited with the 'visudo' command as root. # Failure to use 'visudo' may result in syntax or file permission errors # that prevent sudo from running. # # See the sudoers man page for the details on how to write a sudoers file. # # Host alias specification # User alias specification # Cmnd alias specification # Defaults specification Defaults env_reset Defaults env_keep += "BLOCKSIZE" Defaults env_keep += "COLORFGBG COLORTERM" Defaults env_keep += "__CF_USER_TEXT_ENCODING" Defaults env_keep += "CHARSET LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE" Defaults env_keep += "LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME" Defaults env_keep += "LINES COLUMNS" Defaults env_keep += "LSCOLORS" Defaults env_keep += "SSH_AUTH_SOCK" Defaults env_keep += "TZ" Defaults env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY" Defaults env_keep += "EDITOR VISUAL" Defaults env_keep += "HOME MAIL" # Runas alias specification # User privilege specification root ALL=(ALL) ALL %admin ALL=(ALL) ALL # Uncomment to allow people in group wheel to run all commands # %wheel ALL=(ALL) ALL # Same thing without a password # %wheel ALL=(ALL) NOPASSWD: ALL # Samples # %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom # %users localhost=/sbin/shutdown -h now
Currently Being ModeratedMay 8, 2012 7:32 PM (in response to Sami Cooyar)
You are unauthorized to run this application.
The administrator has set your shell to an illegal value.
I have 2 thoughts.
1st is that your account infomation is actually corrupt. I would look at System Preferences -> Users & Groups -> unlock the padlock in the lower left corner (click on it) -> Option Click on your account name -> Advanced Options. Now check that you have valid account information. The typical information for the first account created on a system would be: User ID 501, Group Staff, Account name is your short name (SC ??), Login Shell: /bin/bash (this is one item to check carefully), Home Directory /Users/SC (or your short name), UUID a very long number. If it does not look something like this, especially /bin/bash, then I would be concerned.
The other possibility is that your /etc/shells file has become corrupt, or missing in action. You /etc/shells file should look like:
# 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/tcshe /bin/zsh
If /etc/shells is missling look for anything closely named, such as /etc/shells~orig, which I have seen reported before resulting in an missing /etc/shells.MacBook Pro, Mac OS X (10.7.3), 27" iMac, MacBook, MacMini, etc...
Currently Being ModeratedMay 9, 2012 1:19 PM (in response to BobHarris)
Thanks for the response. I looked at what you are saying for Option 1 and it is exactly as you describe. In regards to Option 2 (the other possibility) i.e my /etc/shells being corrup. How do I check this to see if it is correct as you are saying? Where would I go to see this?
Thanks again for your time in helping me.
Currently Being ModeratedMay 9, 2012 1:37 PM (in response to Sami Cooyar)
My post showed you exactly what /etc/shells should look like on just about every Mac OS X system. If yours does not look like that, then it could be the problem. If it look exactly like that, then you have some other problem.
Oh, yea. How to you view it when you do not have a Terminal session :-)
Finder -> Go -> Go to folder -> /etc
Control-Click on 'shells' -> Open With -> TextEdit
Message was edited by: BobHarris
Currently Being ModeratedMay 9, 2012 1:37 PM (in response to BobHarris)
Sorry I'm not the most tech advance person. I understand what it should look like but where do I go to see this is what I'm trying to figure out? I don't know where I go to see the /etc/shells.
Currently Being ModeratedMay 9, 2012 1:45 PM (in response to Sami Cooyar)
Ok just did it and here's what we have. Firstly I have two files named shells. One called "shells" and another called "shells~orig". When opening shells it opens a blank text edit page that is blank. When I opened the shells~orig, it contains exactly what you have above. Should I have both these files?
I've attached a screen shot of the file names. It seems strange to me that the shells date created is Dec 31, 1969.
Currently Being ModeratedMay 9, 2012 1:49 PM (in response to Sami Cooyar)
An empty /etc/shells is most likely the root of your probem.
I would try using the Finder to rename the shells~orig to shells
I'm assuming the Finder will prompt you for your Admin password.
If that does not work, can your restore the file from a backup (Time Machine) perhaps?
I think you can use something like TextWranger (free download from Bare-Bones software), and I think TextWranger will let you edit a system file after it prompts you for your admin password.
Hopefully that will get you going. If you run into problems, we can try to figure out something else.
Currently Being ModeratedMay 9, 2012 1:54 PM (in response to BobHarris)
Great thanks Bob! Just went and deleted the shells file then changed shell~orig to shells and now my terminal is able to open.
Again I appreciate your time and efforts in helping me.