Error in Terminal (Can't log in as super-user anymore)

Joined
Dec 5, 2007
Messages
18
Reaction score
0
Points
1
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 to tcsh (I think I was in super-user mode when i did this).

Anyway, when I try to go su now, I get the following error:

Code:
su: tcsh: No such file or directory

The command I used before was
Code:
chsh -s tcsh.
 
OP
L
Joined
Dec 5, 2007
Messages
18
Reaction score
0
Points
1
typing in sudo -i automatically makes me root, but just typing in su, signals me for my password, and once I correctly type it in, I get the error that I mentioned in my first post.
 
OP
L
Joined
Dec 5, 2007
Messages
18
Reaction score
0
Points
1
I restarted my computer and now I'm getting this error...
Code:
"The administrator has set your shell to an illegal value."

So, do you think if I bring back terminal.app from my time machine backup will result in a quickfix?
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
The problem is not the terminal application. You have altered your user configuration. I am not using leopard, so I don't know if the default shell is bash of not.

You can try

sudo chsh -s "shell you want" "user name"

Whereas "shell name" is the shell you want to use and "user name" is the name of the user account you are making this change to. Hopefully this will fix things.

You can also look at the man page for chsh.

man chsh
 
OP
L
Joined
Dec 5, 2007
Messages
18
Reaction score
0
Points
1
ok that didn't work. I tried both sh and bash as my command.
(thanks for the help though)
bah, what now :( ?
 
OP
L
Joined
Dec 5, 2007
Messages
18
Reaction score
0
Points
1
I'm now able to use terminal again, but I still can't login as a super user. I still get the same error. For the shell I want, I kept forgetting to write the full path...I was using sh instead of /bin/sh

I restarted terminal and tried going su again, and I still get the directory not found error.
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
suing by itself will not work unless you enabled the root account. Which is disable by default. What is it that are trying to do, that need constant root access?
 
OP
L
Joined
Dec 5, 2007
Messages
18
Reaction score
0
Points
1
I don't need it very often, but I do need it every now and then. I'm just unnerved that I can't su the way i used to anymore.

Code:
Last login: Wed Jun  4 23:12:11 on ttys000
Lovemaker:~ Arthur$ su
Password:
su: tcsh: No such file or directory
Lovemaker:~ Arthur$

^---This is what happens when I try to su
Yes my computer is named Lovemaker. :p
 
OP
L
Joined
Dec 5, 2007
Messages
18
Reaction score
0
Points
1
ok I fixed it!

So what I did was chsh my account and the root account to the same shell, sh, instead of having one on tcsh and the other one on sh.

Thanks for your help!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top