OS X Monterey and New Mac Book - Ping needs Sudo?

Hi all,

I just got my new MacBook Pro with the M1Pro. Pretty nice machine so far. But tonight I tried opening a terminal ping and doing a Ping of an IP on my network I was greeted with this:

MacBook-Pro:~ jon$ ping

ping: Lacking privilege for raw socket

Huh? OS X Monterey is requiring sudo privileges for Ping? Seriously? Can this be turned off? I have tried ping on other machines that were upgraded to Monterey as opposed to factory installed and they do not have this problem.

How can I change this?

Well, it works fine for me here.

Maybe you are not an admin on that machine?

The title of the post made me think that you’ve written a new Book about Macs, called “Ping needs Sudo”.

@Christian_Schmitz did you “upgrade” to Monterey or use Migration Assistant (upgrading also uses Migration Assistant internally) to a Monterey installation. If so, while it shouldn’t be the case, it does make things unlike a brand new clean install. @Gavin_Smith is a big fan of slow migrations and while at first I was skeptical, I’ve seen the differences with my own eyes to know that Migration Assistant is trash and should be avoided if possible.


I have an upgraded Mac and a new Macbook M1.
and ping works fine on both.

It’s a brand new machine. I figured out what happened. Not entirely sure how to undo it but I figured a work-around.

Yesterday I was installing Brew so I could install telnet and other things Apple has removed in all their infinite wisdom. It appears that some of the binaries that brew installed were not compiled for Apple Silicon. So I decided to compile inetutils-1.9.4 myself. That seems to be where things got wonky. The compiled binaries ended up in /usr/local/bin. Looking in there, I can see which files were added yesterday and sure enough - ping was there. I also discovered there is a copy of ping under /sbin. If I put the path /sbin/ping in my terminal command, things worked fine. So something was not right in the newly compiled version.

To make a long story short I copied the version of ping at /sbin to /usr/local/bin. And now things work.

Not sure what the “correct” path variable should be or if I’ve mucked up anything else. We shall see…

1 Like

Software with a “dangerous” license perhaps?

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.