The UNIX and Linux Forums  

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 10:14 AM
Can't detect usb thumbdrive anymore feef UNIX for Dummies Questions & Answers 2 12-01-2005 06:38 PM
cannot login after changing login shell hardesh HP-UX 4 09-13-2005 09:21 PM
After installing linux cannot boot PC anymore? RellioN Linux 4 05-05-2004 08:52 AM
Standard login shell Fwurm UNIX for Dummies Questions & Answers 4 11-05-2001 08:43 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 04-21-2006
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.
Reply With Quote
Forum Sponsor
  #2  
Old 04-21-2006
Awadhesh's Avatar
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
Reply With Quote
  #3  
Old 04-22-2006
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,441
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?
Reply With Quote
  #4  
Old 04-24-2006
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.
Reply With Quote
  #5  
Old 04-24-2006
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,326
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
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0