New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Apps and Games Discussion of applications and games available for Mac OS X.

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


Post Reply New Thread Subscribe

 
Thread Tools
lazyrussian

 
Member Since: Dec 05, 2007
Posts: 18
lazyrussian is on a distinguished road

lazyrussian is offline
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.
QUOTE Thanks
mac0s9user

 
Member Since: Sep 18, 2007
Location: Guam
Posts: 1,004
mac0s9user is a jewel in the roughmac0s9user is a jewel in the rough
Mac Specs: Gateway2000 P5-60. 66Mhz and 128 MB RAM.

mac0s9user is offline
have you tried sudo??

If you still need super user try this:
http://forums.macrumors.com/showthread.php?t=377802
QUOTE Thanks
lazyrussian

 
Member Since: Dec 05, 2007
Posts: 18
lazyrussian is on a distinguished road

lazyrussian is offline
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.
QUOTE Thanks
lazyrussian

 
Member Since: Dec 05, 2007
Posts: 18
lazyrussian is on a distinguished road

lazyrussian is offline
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?
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
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

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
lazyrussian

 
Member Since: Dec 05, 2007
Posts: 18
lazyrussian is on a distinguished road

lazyrussian is offline
so if I login as root and do the above-mentioned command, that should work?
QUOTE Thanks
lazyrussian

 
Member Since: Dec 05, 2007
Posts: 18
lazyrussian is on a distinguished road

lazyrussian is offline
ok that didn't work. I tried both sh and bash as my command.
(thanks for the help though)
bah, what now ?
QUOTE Thanks
lazyrussian

 
Member Since: Dec 05, 2007
Posts: 18
lazyrussian is on a distinguished road

lazyrussian is offline
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.
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
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?

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
lazyrussian

 
Member Since: Dec 05, 2007
Posts: 18
lazyrussian is on a distinguished road

lazyrussian is offline
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
QUOTE Thanks
lazyrussian

 
Member Since: Dec 05, 2007
Posts: 18
lazyrussian is on a distinguished road

lazyrussian is offline
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!
QUOTE Thanks

Post Reply New Thread Subscribe


« Sound not playing in Quicktime | Twitterific Error »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Please Help me, I can't log into my user account. tinyteddy OS X - Operating System 1 02-18-2006 06:54 AM
Show Item Info inflexion OS X - Operating System 15 10-24-2005 10:34 PM
Terminal Help rs2sensen OS X - Apps and Games 1 04-25-2005 10:52 PM
Super user alejandrico OS X - Development and Darwin 12 12-23-2004 06:07 PM
Allow Another user to log on while the current one has locked the screen fibbi OS X - Operating System 3 08-05-2004 01:37 AM

All times are GMT -4. The time now is 12:05 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?