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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-09-2006, 01:00 AM
|
#1
|
LQ Newbie
Registered: May 2006
Location: FFFF0h PowerGood
Distribution: SLACKWARE 11
Posts: 9
Rep:
|
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

|
|
|
05-09-2006, 01:13 AM
|
#2
|
Member
Registered: Apr 2005
Location: Reno, NV
Distribution: Ubuntu 12.04
Posts: 53
Rep:
|
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. 
|
|
|
05-09-2006, 01:33 AM
|
#3
|
Member
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915
Rep:
|
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.
|
|
|
05-09-2006, 02:55 AM
|
#4
|
Senior Member
Registered: Jul 2003
Posts: 1,257
Rep:
|
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.
|
|
|
05-09-2006, 03:13 AM
|
#5
|
Senior Member
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545
Rep:
|
Could also change it in /etc/passwd.
|
|
|
05-09-2006, 03:56 AM
|
#6
|
Senior Member
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522
Rep:
|
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
|
|
|
05-09-2006, 09:30 PM
|
#7
|
LQ Newbie
Registered: May 2006
Location: FFFF0h PowerGood
Distribution: SLACKWARE 11
Posts: 9
Original Poster
Rep:
|
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.
|
|
|
05-09-2006, 11:41 PM
|
#8
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
If all else fails, you can boot the box with your system CD, mount the partition containing /etc and modify the passwd file.
|
|
|
05-10-2006, 10:55 PM
|
#9
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
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...
|
|
|
All times are GMT -5. The time now is 02:09 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|