Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Root default login shell changed! Help!
Name: John Date: December 9, 2001 at 23:31:34 Pacific
Comment:
Hi All,
I had changed the root default login shell from /sbin/sh to /usr/local/bin/bash in /etc/passwd file but failed to work and I had accidentally logged out from the server. When I tried to login to the server using root account, it will always prompt me for errors found. Now I can't even use sudo command to take control of the server.
Qn: How can I revert back to the default /sbin/sh login shell for the root account??
I had tried to use the below methods but it can't work(currently the server is running Solaris 8): - "boot cdrom -s" and I was prompted with a login password instead of a hash prompt and I could not even mount the default / root directory to edit the /etc/passwd file!!!
Name: Mark M Date: December 10, 2001 at 06:02:23 Pacific
Reply:
When you
boot -s cdrom (not the other way round)
you should be able to do mount /dev/dsk/c0t0d0s0 (or whatever your root partition is) to /a
then cd /a/etc
and edit the end part in /etc/passwd for the root account shell type. (ie: change it back to /bin/sh)
then just reboot the machine and all should be okay.
0
Response Number 2
Name: cheezer Date: December 10, 2001 at 17:09:19 Pacific
Reply:
The reason it faile dis because /usr/local is not seen at the beginning of boot up, only the root partition with /usr.
It is a very common mistake by beginners.
0
Response Number 3
Name: John Date: December 10, 2001 at 17:51:41 Pacific
Reply:
Hi Mark,
Thanks... I tried but I still can't go to the EEPROM I want... Is it becos it is Solaris 8??? It still prompts me for password for maintenance and after that, a login prompt will appear!!!
0
Response Number 4
Name: guichen zhang Date: December 11, 2001 at 06:40:35 Pacific
Reply:
use: OK boot cdrom after the openwin startup, just open another window to do the work. "boot cdrom -s" will ask you the password.
Summary: 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 ot...
Summary: I manually changed the shell for root from sh to csh in the /etc/passwd file and cannot login as root any longer. Give message "cannot find shell". I've tried booting with the CD but as if I was try...