Hi,
I think there are several restricted shells available on net. If you cant find them try the following.
You can write small shell script(say /bin/rksh) which does 'chroot' to '/restricted_home'. And then calls 'bash'. Under '/restricted_home' you can create 'bin/', 'home/temp/'. You might also have to create '/restricted_home/etc/passwd' with 'temp' user's entry(same as in /etc/passwd) in it. You can than put binaries(commands) in bin. Note that these binaries should NOT have any library dependencies, otherwise you might have to create '/restricted_home/lib/' and put files under it.
Note that you must specify user's shell as '/bin/rksh' in /etc/passwd.
Amish.
Mike_Bradz wrote:
is it possible to restrict the user to run only specific commands the least possible.
he shouldnt be able to change to any other directory other than /home/temp (his home directory). So can I just make him stay in his home folder and run only one executable command.