LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-21-2007, 02:09 PM   #1
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Rep: Reputation: 15
sudo problem. Want permission to run a sbin program without a password


This is the line:

Code:
%specialgroup localhost=/usr/sbin/tcpdump NOPASSWD: ALL
visudo is complaining:

Code:
>>> sudoers file: syntax error, line 31 <<<

Last edited by inverted.gravity; 03-21-2007 at 02:20 PM.
 
Old 03-21-2007, 02:26 PM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
try
Code:
%specialgroup localhost = NOPASSWD: /usr/sbin/tcpdump
 
Old 03-21-2007, 02:47 PM   #3
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Original Poster
Rep: Reputation: 15
It's not working, I get this when I try to run it with the user who is in the specialgroup.


tcpdump: socket: Operation not permitted
 
Old 03-21-2007, 02:55 PM   #4
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
Try changing "localhost" to your real hostname.
 
Old 03-21-2007, 03:01 PM   #5
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Original Poster
Rep: Reputation: 15
I changed it to 127.0.0.1, but it didn't work. heh, sudo is a headache
 
Old 03-21-2007, 03:03 PM   #6
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
I said the real hostname. Is "127.0.0.1" your hostname?
 
Old 03-21-2007, 03:09 PM   #7
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Original Poster
Rep: Reputation: 15
Ok, I changed it to laptop as, that's what I have in my bashprompt and my configuration file, its not working.
 
Old 03-21-2007, 03:16 PM   #8
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
The command "hostname" will tell your hostname.
And please post the output, "it's not working" is not enough.
 
Old 03-21-2007, 03:21 PM   #9
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Original Poster
Rep: Reputation: 15
It's laptop. Everytime it's not working, I'm meaning that I'm getting the message that says. operation not permitted. Is even possible with sudo?
 
Old 03-21-2007, 03:29 PM   #10
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Original Poster
Rep: Reputation: 15
I'M SO STUPID, I forgot to use --> sudo <-- tcpdump -n -i eth0. Thank you for your help
 
Old 03-21-2007, 03:31 PM   #11
nifran
LQ Newbie
 
Registered: Jan 2007
Location: Indianapolis, IN
Distribution: RHEL *, Fedora *, Gentoo
Posts: 7

Rep: Reputation: 0
As long as this is a local sudoers file and it's not a central copy on a bunch of machines, you should be able to add the line:

%specialgroup ALL=NOPASSWD:command

Since this is a laptop your hostname may change (depending on your network config), the ALL will match any hostname.
 
Old 03-21-2007, 03:34 PM   #12
inverted.gravity
Member
 
Registered: Feb 2006
Location: Sweden
Distribution: Archlinux
Posts: 112

Original Poster
Rep: Reputation: 15
Ok, thanks again.
 
  


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
sudo and smartctl /dev/hda permission problem on Slackware 10.2 emphaze Linux - General 2 06-21-2006 07:47 AM
sudo password problem Murdock1979 Linux - General 6 04-26-2006 11:39 PM
My Knoppix 3.7 need root password when I run program AskMe Linux - Software 5 04-15-2005 05:35 AM
run program as root / password prompt acidjuice Linux - Software 6 03-15-2005 10:33 PM
Want2use /sbin cmds undr non-root account w/o sudo. Is it safe 2 add /sbin 2 my PATH? kornerr Linux - General 4 02-25-2005 09:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:24 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration