as one gets roots - rights ...
Max Bowsher
maxb@ukf.net
Thu Jul 25 08:34:00 GMT 2002
Norbert Pfeiffer wrote:
> $ ./subnet.pl 192.168.0. 50
> icmp ping requires root privilege at ./subnet.pl line 9
...snip...
> use Net::Ping;
>From Net::Ping: croak("icmp ping requires root privilege") if ($> and $^O ne
'VMS');
That $> is a check for euid == 0 (root). The problem is, that on Windows, there
isn't really a 'root' user. ICMP pings are allowed to everyone in the
Administrators group, IIRC. So, the quick fix is to comment the above line out
in /lib/perl5/5.6.1/cygwin-multi/Net/Ping.pm. (Although your script may fail
with a non obvious error if a non-admin tries to run it.) The long term fix is
for cygwin specific logic to be added to Net::Ping.
Max.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list