Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Root cannot find shell

Status
Not open for further replies.

Geoc

MIS
Aug 2, 2002
28
US
I've a RedHat 7.2 system where Root is now trying to run /usr/local/bin/tsch as its shell (as all the non-root users are configured), instead of /bin/bash (as it should be, and was), and of course, root can't find or run the file. Therefore, logging in as root is problematic . . .
So, is there a way to get root's default shell back to the way it was, without being logged in as root? (Of course, su and chsh don't do it, either)
 
Try copying /usr/local/bin/tcsh to /bin/tcsh or make a symbolic link (ln -s /usr/local/bin/tcsh /bin/tcsh) and see if that will work. You might also put /usr/local/bin in your path in /etc/profile so that it is in the default environment and root can see /usr/local/bin without having to have it in his path. Meekness: Uncommon patience in planning a revenge that is worth while.
-- Ambrose Bierce
 
Without being able to log in as root, the permissions to do any of the above aren't there . . .
Therein lies the Rock and Hard place, right next to Catch-22 . . .
 
You'll probably have to boot to single user mode and see if you can get in and fix it that way. Meekness: Uncommon patience in planning a revenge that is worth while.
-- Ambrose Bierce
 
Thanks! Thats exactly how I got it fixed! (Single user Mode)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top