0

I am running an ARP poisoning and defender code. But this is the output it always shows.

pcap_open_live(): enp0s8: You don't have permission to capture on that device (socket: Operation not permitted)

I looked online and tried add this code but it is not working

sudo groupadd pcap
sudo usermod -a -G pcap rishab
chgrp pcap /usr/sbin/tcpdump
chmod 750 /usr/sbin/tcpdump
setcap cap_net_raw,cap_net_admin=eip /usr/sbin/tcpdump

Can you tell me what I am doing wrong

I am using Ubuntu 20.04

rishab is my username on both the linux vmware

myresult

  • rishab wasn't in the group yet. Have you logged out yet? or at least su into rishab-but this will only work for that shell.. not any others that are open or yet to be opened until you have logged out... – WU-TANG Oct 10 '20 at 03:21
  • @WU-TANG Can you please explain when do I need to logout? – volpone smark Oct 13 '20 at 04:49
  • when you add a user to a group, that shell youre in doesnt know it yet... There are other ways to make the change register, but logging out is the easiest. (better said, logging in... which is why su will also work) – WU-TANG Oct 13 '20 at 07:01

0 Answers0