How to restrict the number of commands user can execute

Hi all,

Is there a way to prevent users from being able to execute commands less a select few? For instance, I wish to allow the user to be only able to execute 1 command, which is exec a.sh. He should not be able to do simple stuff such as ls, cd, rm, cat, etc.

Can this be achieved?

Thanks a bunch!

There are several way's of doing this. Many of them depend on what OS you are using. However the most universal and easiest way I can think of is to setup a "jail shell" also know as a "chroot shell".