Hi all !
I want to configure tcpdump to work as non-root user on CentOS
ex: test.c
#include <stdio.h>
#include <pcap.h>
int main(int argc, char *argv[])
{
char *dev, errbuf[PCAP_ERRBUF_SIZE];
dev = pcap_lookupdev(errbuf);
if (dev == NULL) {
fprintf(stderr, "Couldn't find default device: %s\n", errbuf);
return(2);
}
printf("Device: %s\n", dev);
return(0);
}
compile: gcc -o test test.c -lpcap
-----------------------------------------------------------
It can't run with non-root user.
Then, I set up
$groupadd tcpdump
$addgroup <username> tcpdump
$chown root.tcpdump /usr/sbin/tcpdump
$chmod 0750 tcpdump
$setcap "CAP_NET_RAW+eip" /usr/sbin/tcpdump
But It does not run.
I want to run with non-root user on CentOS. I run on CentOS 6.4
Please help me ! thanks all....
Configure tcpdump to work as non-root user on CentOS
-
- Posts: 1
- Joined: 2014/04/15 18:08:25
Re: Configure tcpdump to work as non-root user on CentOS
Read the wireshark howto pages http://wiki.wireshark.org/CaptureSetup/ ... Privileges
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke