LinuxQuestions.org
Visit Jeremy's Blog.
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 01-18-2011, 01:21 PM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 716

Rep: Reputation: 39
sudo access for a user to a script


Hi there --

I am trying to get a non-root account on one of our servers to run a script with sudo capability. To that end, I went into the /etc/sudoers file, and added the following syntax:

Code:
## Enable the nagios user to run the check_iptables.sh script as root
nagios  ALL=NOPASSWD: /usr/local/nrpe/libexec/check_iptables.sh, /sbin/iptables
I restarted the nagios service, and tested the results. The results were the user account still could not run the script due to the user, nagios, not having permission to run the iptables binary.

Is there another step(s) that I need to take in order to get the sudo access available to the user account?
 
Old 01-18-2011, 01:28 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Are you sure that is the privilege violation? On my system, Ubuntu 10.04, any user can run iptables. That is the default file permission. However there may be a privilege violation if the ordinary user tried to change the tables or perform some other function within iptables.

Maybe something else in nagios or iptables is not being granted privileged access.

Naturally you are trying this by preceding the command with sudo aren't you?
Code:
sudo iptables --list

Last edited by stress_junkie; 01-18-2011 at 01:31 PM.
 
  


Reply


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
visudo? I need to provide sudo access to Oracle User rohit724 Linux - Newbie 2 12-09-2010 10:25 AM
Script needed to get users with sudo access mikeb75 Linux - Server 1 12-01-2009 12:21 PM
In a perl script, how to test if user has sudo execute w/o password ? etomato Linux - Newbie 6 11-19-2008 10:18 PM
Running a script as root with sudo without entering the user password kloss Linux - General 8 10-10-2005 11:39 AM
allow sudo for www user to run root shell script cccc *BSD 12 07-23-2005 03:48 PM


All times are GMT -5. The time now is 01:36 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