Cannot login to CDE after changing root shell

I changed root shell via the following in /.profile

if [ -x /usr/bin/ksh ]; then

SHELL=/usr/bin/ksh

export SHELL

exec /usr/bin/ksh

else

echo /usr/bin/ksh not found using default shell of $SHELL

fi

It works fine apart from when I try to log into CDE as root, where I get kicked straight out again, the following messages appear in /.dt/startlog:

Thu Mar 24 11:44:43 GMT 2005

/usr/dt/bin/Xsession starting...

starting /usr/openwin/bin/speckeysd

Xsession started by dtlogin

starting /usr/dt/bin/dtsession_res -load -system

sourcing //.dtprofile...

sourcing /usr/dt/config/Xsession.d/0010.dtpaths...

sourcing /usr/dt/config/Xsession.d/0015.sun.env...

sourcing /usr/dt/config/Xsession.d/0020.dtims...

sourcing /usr/dt/config/Xsession.d/0030.dttmpdir...

sourcing /usr/dt/config/Xsession.d/0040.xmbind...

sourcing /usr/dt/config/Xsession.d/1000.solregis...

starting /usr/dt/bin/dthello &

starting /usr/dt/bin/dtsearchpath

starting /usr/dt/bin/dtappgather &

starting /usr/dt/bin/dsdm &

session log file is /dev/null

DTSOURCEPROFILE is 'true' (see //.dtprofile)

execing /usr/dt/bin/dtsession with a /usr/bin/ksh login shell ...

starting desktop on /dev/pts/3

Sun Microsystems Inc.SunOS 5.8Generic PatchOctober 2001

zfhuslmon001# /usr/dt/bin/Xsession[792]: 383 Hangup

X connection to :0.0 broken (explicit kill or server shutdown).

X connection to :0.0 broken (explicit kill or server shutdown).

X connection to :0.0 broken (explicit kill or server shutdown).

The following messages appear in /.dt/errorlog

Thu Mar 24 10:09:01 2005

Workspace Manager: I/O error on display:: :0.0

Thu Mar 24 10:09:01 2005

dtsession: Connection to server lost - exiting.

Have tried adding the following at end of /.dtprofile:

DTSOURCEPROFILE =true

SHELL=/usr/bin/ksh

export SHELL

but to no avail.

I can log in to CDE via any other user name and then su - root and it works fine, so I think it must be the /.dtprofile

Any ideas or help would be appreciated.

[2253 byte] By [pdm28] at [2007-11-25 23:35:03]
# 1
Talk about Deja vu. :-)I did the exact same thing a couple weeks ago. You can't exec a new shell. It screws-up the CDE startup. I'm not sure why. I didn't follow-up on the exact cause, or if there was a solution.HTH,Roger S.
Jo_nage at 2007-7-5 18:19:40 > top of Java-index,General,Talk to the Sysop...
# 2
..out of curiosity, why don't you just change root's login shell in /etc/passwd?
Codename47 at 2007-7-5 18:19:40 > top of Java-index,General,Talk to the Sysop...