* zentara wrote:
> On Fri, 22 Dec 2006 13:17:33 -0500, [EMAIL PROTECTED] (Nathan
> Gibbs) wrote:
>
>
>> The current Problem:
>> Net::Ping won't do icmp as a non root user. I RTM, which said that
>> if I suid'ed ( Hmmm is that a word ?? )the script it would work, however
>> it still refuses to work.
>>
>> I must be missing some detail here.
>> What am I missing?
>
> You could ask this on http://perlmonks.org
>
> Just guessing, I would guess that your suid isn't setup right,
> remember, a web client comes in as something like "nobody:nogroup",
> so have you looked into that? It sounds insecure to suid anything
> from cgi to root. Another possible problem is that there is another
> program which may be called by Net::Ping, and that would need to be
> suid'd too. Or the system disallows suid scripts.
> I think most people now recommend using sudo, instead of suid.
> Google for sudo for examples of setting it up.
>
> Why not just use a non-priviledged ping?
> SNIP
> __END__
>
>
>
Duuh, Why didn't I think of that, Doh!,Doh!;Doh!
The village idiot has been spotted.
You are absolutely right.
I wasn't too excited about the suid option either. However, for
some reason I incorrectly thought that the other ping methods would
return an unreachable status if their was nothing running on the
host:port I pinged. Tcp works just fine. It would be nice if the icmp
ping method worked as a non root user, just from a network utilization
point of view, but it really doesn't make much of a difference.
Thanks for the advice.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>