changed shell of the root accidentally

Hi All,
I have changed the shell of the root accidentally to /sbin/bash :mad:
How do I change that? :frowning:
To change that I need to go to ok prompt I think, and there I need to mount the root file system in order to make changes to the respective file.

Can any one please suggest how do I do that? Give me details of the procedure how to do the same.

-Asim

This will be very similiar to recovering from a lost root password. Read the "lost root password" article in our FAQ section.

I am assuming you are unable to login in to the box.

If the OS is running, type:
df -k /

There should be an entry that looks like: /dev/dsk/c0t0d0s0

Write this down.

If it is /dev/vx/dsk/<something>, this is a little more complicated.

If it is /dev/md/d<some number>, again a little more complicated.

Put a Solaris install CD in the CDROM.

From the ok prompt (press stop and A to get there) type:
boot cdrom -s

Once the box has booted from CD, it will give you a root prompt. You need to mount the root file system.
# mkdir /tmp/a
mount /dev/dsk/<c?t?d?s? from above> /tmp/a
cd /tmp/a/etc
vi passwd

Change the root shell to /sbin/sh

Then:
cd /
umount /tmp/a
reboot

If you like using bash, which I do, then the first thing you type after the root password is always: bash

I have bash aliased in the root profile to exec bash so I don't have to walk back through the shells when logging out.

hi,
thanks for the reply.
actually I'm facing problem in goin' to ok prompt.
i have to go to the console through a tc and a normal key board.
what i did was manually rebooted it and then ctrl + ]
a telnet prompt came, there i typed send break...but all was fruit less :frowning:
what to do?

-Asim

What program are you using to access your terminal server? and spacifically what keys are you pressing to send your ctrl break?

William