Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I want to restrict some of my Operating System users running unwanted commands. I just want them to run specified commands only. How can i achieve this?
If what is really wanted isn't to give specific super user permissions to some users, but rather give some users a "lower rank" than "normal" users, would that also be a matter of "sudo" configurations? I think that it would require some complex configuration of the groups to which each user belongs, I guess. But I don't quite know how it works, and I suspect it can't be so much arbitrarily restrictive, like "user x can 'cat' and 'less' but can't 'grep'".
As any user can install anything in his home or /tmp, it would also mean to mount at least these two file systems with the noexec option in /etc/fstab.
I want to restrict some of my Operating System users running unwanted commands. I just want them to run specified commands only. How can i achieve this?
Thanks
Asanka
The concept is in /etc/sudoers you can define which user can use which command.
Then the user can use the command by
Quote:
sudo <command>
Now google about this for in details..
Last edited by divyashree; 05-26-2011 at 06:29 AM.
Hi team
To my knowledge this has to be done with /etc/sudoers
Here you can exactly restrict the users to run only particular commands
When the any of the user runs any commands for which he is not given permission ,error will throw stating PERMISSION DENIED.
Using this even the root can be restricted from running some commands.
I think this link may help you better
Karthick3152, did you read what EricTRA posted, and did you read the previous replies?? That has already been posted/suggested to the OP, and restated (again) by divyashree.
Last edited by unSpawn; 06-05-2011 at 09:32 AM.
Reason: //Removed web log advertising link
You can restrict the users by setting their shell to rbash, then make a directory with links to the programs they are allowed to run and put that in the users' $PATH variable.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.