On Linux, is root privilege required to send a wake-on-lan magic packet?

If it depends on how you send the magic packet, please let me know under what situation root is required.

link|improve this question

62% accept rate
feedback

1 Answer

up vote 2 down vote accepted

It depends on the program you use to send wake-on-lan packets. Some programs use raw packets, and therefore require root. Other programs embed the magic wakeup sequence in a bog standard UDP packet, and thus do not require root.

In theory it shouldn't matter what kind of packet you use, as long as there's the magic wake-on-lan sequence somewhere inside it. In practice I seem to remember that my old desktop refused to wake up when I used a Python script that sent UDP packets, but worked fine if I used a C program that used raw packets.

link|improve this answer
I see. So if a WoL program requires root the reason is that it sends raw packets. Thanks! And just a quick check: sending packets to the broadcast address doesn't need root, right? – netvope Sep 28 '10 at 7:07
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.