LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 08-16-2007, 12:35 AM   #1
nitin_ucer
LQ Newbie
 
Registered: Aug 2007
Posts: 14

Rep: Reputation: 0
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.
 
Old 08-16-2007, 02:16 AM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
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...
 
Old 08-16-2007, 02:32 AM   #3
nitin_ucer
LQ Newbie
 
Registered: Aug 2007
Posts: 14

Original Poster
Rep: Reputation: 0
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
 
Old 08-16-2007, 04:29 AM   #4
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
do a
man usermod
and read in there how to change the shell of a person.
or simply edit the /etc/passwd file.
 
Old 08-16-2007, 02:07 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,991
Blog Entries: 54

Rep: Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744Reputation: 2744
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?
 
Old 08-16-2007, 03:33 PM   #6
reverse
Member
 
Registered: Apr 2007
Distribution: Gentoo
Posts: 337

Rep: Reputation: 30
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?
 
  


Reply

Tags
bash


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I modify a proxy for the commands IRLAMP Linux - Networking 1 03-27-2006 11:13 AM
bash - execute commands on a remote machine capture results, etc dkrysak Programming 1 11-18-2005 01:50 PM
Execute bash commands from web page solomage Linux - Software 1 10-07-2004 10:54 AM
BASH scripting; su to user, commands after dont execute Zero-0-Effect Programming 4 06-07-2004 11:09 AM
how to execute commands on login k4zau Linux - Software 3 10-12-2003 01:52 PM


All times are GMT -5. The time now is 12:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration