Modify Shell default

Hi All,

How can I change the shell default used in my Solaris?
eg.. modify it to always use bash....

thanks!

edit the /etc/passwd

Or using the command line as root:

usermod -s /bin/bash <username>

How can I edit the /etc/passwd without being able login as root?
I modified the /etc/passwd from /sbin/sh to /sbin/bash

and it does not login anymore... :eek:

how can I solve it???

Thanks!!!!!

You can change your login shell if your system has chsh(1)

How can I use chsh without being able to login?

Why did you change the root shell? Do you have any normal users defined?

Ok, I was able to revert it...
I logged with another user and used su
it requested root passwd and allowed me to modify the passwd file again...

to be honest, I am just trying to learn about it...

what should be the modification in passwd file If I want to change the shell used for root?

Also, what is the differences between them?

Thank you!!

I understand that you are learning, so here are a couple of lessons to get you started.

Root is the super-user in Unix, when working as root there are very few safety checks performed.
Don't use root unless you have to, you are likely to break your machine if you do and are inexperienced.
Don't log in directly as root, use 'su' from a normal user.
Don't change the root shell, it can be done easily but there is no need to do so. If you have to work as root and want a different shell then just type the name of the shell you want to use (eg bash)
Do use and customize a normal user in whatever way you want, including the shell you want to use, the usermod command below will work for you.