LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-15-2011, 11:35 AM   #1
kususe
Member
 
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.
Suggestions??
 
Old 03-15-2011, 11:41 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
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
kususe
Member
 
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
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
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:
Code:
su -c 'vi passwd'
Will require you to enter the root password before proceeding.

--- rod.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:40 AM.

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