Automatically change to Bash shell after login

Hi men,

I think this must be a very common job. "How could to Automatically change to Bash shell after login and then jail user can only using this shell".

I want monitor user works.However it just only effect on Bash shell. Consequently if the user change the shell it will be worthless.

As i remember there's a topic mention about this but i cannot find it again. So i recreate a new topic. Please help me. THank for reading!

A users default shell can be changed using the chsh command. It should only accept shells listed in /etc/shells. Remove any shells from /etc/shells that you don't want users accessing.

Not all unix systems enforce the use of shells from /etc/shells by default. It's a configurable option on most systems. You'll have to read up on your flavor of unix to find out how it implements this functionality.

You will also have to remove execute permissions from any shells you don't want users running.

my system that i working on is Solaris ... there's no /etc/shells file

On Solaris, after type "bash" the shell change to "bash shell", but people can easily change by typing "exit"

set the users default shell in "/etc/passwd".

Hi.

See man shells on Solaris 10; passwd -e changes shell; man vipw to see how to edit passwd file directly. The file /etc/shells is consulted by utilities, but if it does not exist, then a few other places are checked -- again man shells for details ... cheers, drl