LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-09-2006, 01:00 AM   #1
evzen
LQ Newbie
 
Registered: May 2006
Location: FFFF0h PowerGood
Distribution: SLACKWARE 11
Posts: 9

Rep: Reputation: 0
help me please situation CritiCal


I accidentaly changed the shell for root to "my name"
now whenever i am trying to log on as root it log me off and says cannot execute "my name" however i can log on as subuser
how to log on as root if i know the password but it just allways log me off
please help
 
Old 05-09-2006, 01:13 AM   #2
stormyk88
Member
 
Registered: Apr 2005
Location: Reno, NV
Distribution: Ubuntu 12.04
Posts: 53

Rep: Reputation: 15
What 'shell' did you change? I know very little about this, but I recently forgot my root pw and had to wipe my system. I know there are other ways around it, someone else with more knowledge than me will chime in soon.
 
Old 05-09-2006, 01:33 AM   #3
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

Rep: Reputation: 34
Quote:
Originally Posted by stormyk88
What 'shell' did you change? I know very little about this, but I recently forgot my root pw and had to wipe my system. I know there are other ways around it, someone else with more knowledge than me will chime in soon.
He must have changed his login shell. The default for the GNU/Linux system is bash.

If you use Fedora Core, you can invoke system-config-users, type in your root password (which should be doable since it does not invoke the shell), and change the shell of root back to /bin/bash. I haven't tried it myself, but it *should* work.
 
Old 05-09-2006, 02:55 AM   #4
ehawk
Senior Member
 
Registered: Jul 2003
Posts: 1,257

Rep: Reputation: 48
I think this should work (get other opinions)

First, you need to log in using linux single mode

http://www.redhat.com/docs/manuals/l...ng-single.html

When you are logged in this way (as root) change the shell using chsh:

chsh -s /bin/sh (or whatever)

http://unixhelp.ed.ac.uk/CGI/man-cgi?chsh+1

You should also change the subject description to something more descriptive, before a moderator freezes this thread and prevents you from getting more help.
 
Old 05-09-2006, 03:13 AM   #5
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Could also change it in /etc/passwd.
 
Old 05-09-2006, 03:56 AM   #6
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
Quote:
Originally Posted by cs-cam
Could also change it in /etc/passwd.
That'd be my suggestion too, either if you have Sudo setup, or just su from a user with a working shell
 
Old 05-09-2006, 09:30 PM   #7
evzen
LQ Newbie
 
Registered: May 2006
Location: FFFF0h PowerGood
Distribution: SLACKWARE 11
Posts: 9

Original Poster
Rep: Reputation: 0
Smile login shell

yes i did changed login shell iam running slackware and i guess ill try first what daihard sugested thanx for now **it did not work
su doesnt work neither, single mode doesnt work
how do i change the login shell** chsh for root wont work from user mode damnit

Last edited by evzen; 05-09-2006 at 10:49 PM.
 
Old 05-09-2006, 11:41 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
If all else fails, you can boot the box with your system CD, mount the partition containing /etc and modify the passwd file.
 
Old 05-10-2006, 10:55 PM   #9
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
By the way, once you've booted the PC with the rescue CD, you'd do something like the following. I'm assuming the partition containing the /etc directory is on /dev/hda1 and that it is ext3:
Code:
mkdir -p /mnt/harddisk
mount -t ext3 /dev/hda1 /mnt/harddisk
vi /mnt/harddisk/etc/passwd
You can use any text editor, it doesn't have to be vi (pico, joe, etc.). The line for root should be something like:
Code:
root:x:0:0::/root:/bin/bash
Hope that helps...
 
  


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
Serious situation, please help wardialer Mandriva 10 04-22-2005 01:43 AM
my situation thing0 Linux - Newbie 9 02-18-2005 12:22 PM
the wireless situation kinbote Linux - Laptop and Netbook 10 04-28-2004 02:05 AM
L 99 99 99 situation after Suse 8.x Wizno Linux - Newbie 3 10-26-2003 02:27 PM
Interesting Situation Bigun Linux - General 5 05-23-2003 09:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:00 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