Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-15-2011, 11:35 AM   #1
Registered: Oct 2010
Posts: 54

Rep: Reputation: 0
linux shell not found

Customizing my shell, I set up for the user root, a shell doesn't exist.
And now, all of operation that requires root privileges, don't work.
I tried to log as root, but nothing, neither using graphic interface.
Old 03-15-2011, 11:41 AM   #2
Senior Member
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Could you reset root's shell to /bin/sh ? And what did this 'customization' involve?
Old 03-15-2011, 12:13 PM   #3
Registered: Oct 2010
Posts: 54

Original Poster
Rep: Reputation: 0
How could I reset root default shell?
I know that the only method in order to do this is modify enviroment variable "SHELL". But I have to be logged as root to use this solution.
Old 03-15-2011, 01:54 PM   #4
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,133
Blog Entries: 2

Rep: Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836
At boot time, modify your Grub, so that your kernel line contains init=/bin/bash. This will start your system with the bash shell only, modify what you need to do and reboot.
Old 03-15-2011, 06:49 PM   #5
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
I'm not completely sure, but I think you can become root for one command, even if the root shell is borked:
su -c 'vi passwd'
Will require you to enter the root password before proceeding.

--- rod.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Understanding a Shell Script I Found carlosinfl Linux - General 1 07-11-2007 06:18 PM
xfree86 not found under shell jjoooo Debian 1 03-21-2005 12:13 PM
No Bourne Again Shell or no such directory found apeman Slackware 1 05-29-2004 05:15 AM
command not found (My shell script) Swift&Smart Linux - Software 3 05-15-2004 11:14 PM

All times are GMT -5. The time now is 07:25 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration