Linux - Security This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-16-2007, 01:35 AM
|
#1
|
LQ Newbie
Registered: Aug 2007
Posts: 14
Rep:
|
How to modify bash to allow to execute some specified commands only ?
I want to modify bash to allow some prespecified set of commands to be executed.whenever I or someone else types on the command line and tries to execute any command, that command is checked to see if it is allowed.I came to know that "Secure Bash" is used to come with this feature but I could not find it anywhere on net.
|
|
|
08-16-2007, 03:16 AM
|
#2
|
Senior Member
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191
Rep:
|
if there are a few set of commands that you do not want ordinary users to execute, simply do a
chmod 700 /bin/df
chmod 700 /bin/ping
and so on...
|
|
|
08-16-2007, 03:32 AM
|
#3
|
LQ Newbie
Registered: Aug 2007
Posts: 14
Original Poster
Rep:
|
Thnx, but I want to make my "secure shell"(modified bash) as default shell so that whenever any user login to the system he will be allowed to execute only some commands specified by me
|
|
|
08-16-2007, 05:29 AM
|
#4
|
Senior Member
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191
Rep:
|
do a
man usermod
and read in there how to change the shell of a person.
or simply edit the /etc/passwd file.
|
|
|
08-16-2007, 03:07 PM
|
#5
|
Moderator
Registered: May 2001
Posts: 29,415
|
Can you elaborate on what you're exactly trying to accomplish? Who are you (thinking you are) protecting what from? What's the set of commands?
|
|
|
08-16-2007, 04:33 PM
|
#6
|
Member
Registered: Apr 2007
Distribution: Gentoo
Posts: 337
Rep:
|
Just because you allow them to hand pick the commands they can tell the shell to execute, don't think it's impossible for your users to make *those* programs execute *other* programs. How are the users logging in? Physical access or ssh/something else?
|
|
|
All times are GMT -5. The time now is 05:30 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|