The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
localhost-routing not working anymore in OpenSuse v10.1 Corvin UNIX for Dummies Questions & Answers 2 09-10-2007 01:14 PM
Can't detect usb thumbdrive anymore feef UNIX for Dummies Questions & Answers 2 12-01-2005 09:38 PM
cannot login after changing login shell hardesh HP-UX 4 09-14-2005 12:21 AM
After installing linux cannot boot PC anymore? RellioN Slackware 4 05-05-2004 11:52 AM
Standard login shell Fwurm UNIX for Dummies Questions & Answers 4 11-05-2001 11:43 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-21-2006
homechoice homechoice is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 2
Exclamation Can't login as SU anymore - SU: NO SHELL

the root shell has been changed in the file /etc/passwd, basically pointing to an incorrect directory. So now every time we login as 'su' I get the message
'su: no shell' so we can't login as superuser.

Is there an easy way to rectify this? please use step by step instructions/commands -

I know one way is to boot off a cd on the machine in single mode and then mount the root dir and then change the file...but I'm unsure about the command line. Is there any other way? I've tried linking the path, but permission rights stopped this.
  #2 (permalink)  
Old 04-22-2006
Awadhesh's Avatar
Awadhesh Awadhesh is offline
Registered User
  
 

Join Date: Jul 2005
Location: Delhi, India
Posts: 92
Hi

Try if u can change roots shell in /etc/passwd file, if any root currently log in, else try to machine in single user mode and mount the /, then change roots shell.

Awadhesh
  #3 (permalink)  
Old 04-22-2006
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,668
If you have permissions, you can copy the shell to the "incorrect location"... what is the full path of the shell in /etc/passwd now?
  #4 (permalink)  
Old 04-24-2006
homechoice homechoice is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 2
permissions dont allow me to copy bash to the 'incorrect dir'.
in /etc/passwds it's set to /sbin/bash but should have been /usr/bin/bash.
  #5 (permalink)  
Old 04-24-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Have run into this before. The only thing that we could do was reboot.
1. reboot from cdrom
2. mount the '/' filesystem as /a
3. vi /a/etc/passwd and change the shell to the required value
4. save and exit
5. reboot from disk
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:01 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0