Computing.Net > Forums > Solaris > Invalid default login shell for root

Invalid default login shell for root

Reply to Message Icon

Original Message
Name: Subra
Date: January 30, 2002 at 16:09:32 Pacific
Subject: Invalid default login shell for root
Comment:

Hi All,

I was trying to change the default login shell for root from sh to tcsh on Solaris 8 in the /etc/passwd file. Accidentally, the path inserted was an invalid one.

Unfortunately, there are no other users with root privileges. su is not working as I get an invalid shell error message.

Based on a posting in this board, I tried to go into maintenance mode and boot from a CD. However, I get the same invalid shell message in maintenance mode and I get kicked into regular startup mode.

Please Help!

Thanks,

Subra


Report Offensive Message For Removal


Response Number 1
Name: Mark M
Date: January 30, 2002 at 17:23:19 Pacific
Reply: (edit)

boot -s cdrom from the ok prompt still gives the error?

if you have a backup of your passwd file on the drive then you could do an interactive boot and specify that file instead?



Report Offensive Follow Up For Removal

Response Number 2
Name: Steve M
Date: January 30, 2002 at 20:41:08 Pacific
Reply: (edit)

From the OK prompt, type boot cdrom -s

Then mount root (mount /dev/dsk/c0t0d0s0 /a)

Edit the /a/etc/passwd file and change the shell back to /bin/sh


Report Offensive Follow Up For Removal

Response Number 3
Name: ripon
Date: January 31, 2002 at 15:50:33 Pacific
Reply: (edit)

hi friends,

superuser's (root) default shell is not /bin/sh, it is /sbin/sh.

take care.


Report Offensive Follow Up For Removal

Response Number 4
Name: Subra
Date: January 31, 2002 at 16:55:21 Pacific
Reply: (edit)

Hi Mark,

Could you tell me exactly how to get to the OK prompt as well as how to do an interactive boot?

I am more of a developer trying to maintain the server and am not familiar with the usual sys admin stuff.

Thanks,

Subra


Report Offensive Follow Up For Removal

Response Number 5
Name: Anonymous
Date: February 3, 2002 at 00:44:07 Pacific
Reply: (edit)


To get to the OK prompt, you need to send a "break" to the system. If your directly on the system, you can simply hit Stop-A and that should take you straight to the ok prompt. To do an interactive boot from cdrom, "boot cdrom - install" (lose the quotations and note spaces). To boot from the network, "boot net - install"

If you are telneting to the system, to get to the okay prompt it would be something like Ctrl-] followed by "send brk".

If you are sshing to the system, to get to the okay prompt, hit : ~~#


Report Offensive Follow Up For Removal


Response Number 6
Name: Bill
Date: February 7, 2002 at 15:55:45 Pacific
Reply: (edit)

I am also looking at this problem. I can get to the ok prompt - thanks! But, when I mount /dev/dsk/c0t0d0s0 /a my a directory has no subdirectories or files. So I cannot edit the passwd file. Any ideas?


Report Offensive Follow Up For Removal

Response Number 7
Name: Nasir Kamal
Date: April 27, 2002 at 04:09:29 Pacific
Reply: (edit)

I dont want to STOP-A the server as it can potentially crash the filesystems (having Disk Array),,, i m able to login through normal user... what shd i do using the normal user account ????

thanks
nasir


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Invalid default login shell for root

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge