change default shell

hi all,
       I am just a unix(solaris) shell user(not root) and i login via telnet and everytime i login i get ksh as my default shell.I was wondering if i could change it to bash instead.I cannot change /etc/passwd file line for changing it as i am not a super user.Is there any other way to do it?

Thank you.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:
a) Manually:
    exec bash
b) Automatically:
    As you are running ksh as default shell, just create/edit your local
   login script .profile adding the line
       exec bash
   at the end.
   If you are using CDE for graphical login, add it like below.

To tailor your shell's behavior you can also add stuff into ~/.bashrc
#   .... some code already there in this file.
# add at the end
if [ -x /usr/bin/bash ] ; then
  SHELL=/usr/bin/bash ; export SHELL
[ ! "$DT" ] && exec $SHELL

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
In your .profile, add:

[ -x /usr/bin/bash ] && exec /usr/bin/bash

Adjust the path above if needed to where bash is installed
Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:
this is a short form of what I've already suggested -- unfortunately, it will not
propagate the changed shell's name to other programs that will get started
up later (like running a terminal window in X11 "xterm -ls ..."). They will still
use the former shell (or whatever has been put into the SHELL variable).

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.