On 10/19/2010 12:37 PM, Arun Khan wrote:
On Fri, Oct 15, 2010 at 7:46 AM, Yogesh<yogeshg1...@gmail.com>  wrote:
 Hi,

 I wanted to prevent execution of file (binaries and scripts) under the
 home directory. I know I can do this by:

 sudo mount -o remount,noexec /home/user

 But I also want to prevent execution of scripts under the dir. For e.g.
 I can do a sh /home/user/filename.sh and it would still run the script.
 So I want to deny access to interpreters to the home directory.

 sh
 bash
 perl
 php
 python etc.


I don't think this can be done; I believe it would disable your basic
login process and CLI.   Would like to hear opinions from shell gurus.


That is correct ...due to the inherent nature of interpreters ...

[st...@laptop ~]$ echo "ls" | bash -i
or
[st...@laptop ~]$ bash -i < script.sh

cheers,
- steve
--
random spiel: http://lonetwin.net/
what i'm stumbling into: http://lonetwin.stumbleupon.com/
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to