how can i restrict commands


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how can i restrict commands
# 1  
Old 09-12-2009
how can i restrict commands

hi all,
i want to restrict commands to run from a specifc directory..and to make that only some specific commands to run ,,not all.

please help me ...how can i make this happen.
# 2  
Old 09-12-2009
Give execute permission only to those executables, so it will be allowed to execute only those !

If this is not you expected, kindly explain about your requirement clearly. Also tell us what you have tried.
# 3  
Old 09-12-2009
You can also create a chroot jail for users, or force them to use a restricted shell - rsh for example.
# 4  
Old 09-13-2009
thanks for replying,

my requirement is:
user can run only those scripts which are in a particular directory along with only some of the regular shell commands like 'clear' etc.
it is somewhat like when u are in 'grub>' prompt can't run regular shell commands.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Restrict sudo -i

Hi, I wanted add a group to the sudoers file so they can run sudo commands and blocked su command but it seems they can just run sudo -i to switch to root which defeats my purpose. Is it possible to block sudo -i with the help of sudoers file or any other way. Please advise. The below... (1 Reply)
Discussion started by: Jartan
1 Replies

2. Shell Programming and Scripting

How to restrict ssh by forced commands but sftp login should be enabled?

Hi, I am trying to restrict an ssh-user to execute unwanted commands using ssh from a remote host a. So for that I am using the forced command in the authorized_keys file that will allow the ssh-user to only execute a particular command. If I did not set this, I am able to login via ssh and... (2 Replies)
Discussion started by: Anil George
2 Replies

3. UNIX for Dummies Questions & Answers

Restrict access

I'm trying to use squid to restrict elinks' access to certain websites(only http traffic). I have tried some configs in squid.conf but no luck. Hope someone has a bit of time to explain me how can you make these config's :) ---------- Post updated at 05:40 PM ---------- Previous update was at... (1 Reply)
Discussion started by: Birnbacher
1 Replies

4. Shell Programming and Scripting

How to restrict root user from running some commands

is it possible that we can restrict the root user if he runs some commands?? e.g i want if root runs command 'rm etc/passwd', he shoudn't be able to run command and throws error :confused: (3 Replies)
Discussion started by: sheelsadan
3 Replies

5. Shell Programming and Scripting

restrict USB

Hi, How can i restrict use of USB in redhat. & also is it possible to allow USB devices for only specific devices or only few known penDrives......? Thank you (4 Replies)
Discussion started by: shivarajM
4 Replies

6. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

7. Solaris

restrict commands

Dears, how to determine the commands that could be used by certain user..like I want to prevent some users from running pwd command???? Thanx (4 Replies)
Discussion started by: mm00123
4 Replies

8. Shell Programming and Scripting

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? ... (1 Reply)
Discussion started by: rockysfr
1 Replies

9. Solaris

how to restrict the perticular commands to users

Hi all, How to restrict the perticular commands to users(or perticular users) in solaris10? Could you please assist me the precedure for above issue. Thanks & Regards krishna (0 Replies)
Discussion started by: krishna176
0 Replies

10. Shell Programming and Scripting

Possible to restrict SED

Hi, I guess by default SED looks for any occurences anywhere in the file or text. Is it possible to restrict the search to replace only for the complete pattern . I have data file like record 1->"abc abc123" record 2->"123 aaaaa" record 3->"./abc acacac" i have a replace file ... (7 Replies)
Discussion started by: braindrain
7 Replies
Login or Register to Ask a Question