[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: first installation, network problem



> -rwsr-xr-x   1 root     root        12476 Feb 14 02:22 /bin/ping
> However, I wonder why ping has to be setuid root. Anybody more
> knowledgeable than me out there?

This has been explained already.

Ping (and traceroute) must be suid root in order to send out ICMP packets. 

Other programs don't need to be root because they can access the net 
through regular TCP or UDP, which is available to regular users.

Sending out ICMP packets (as ping and traceroute do) requires access to 
raw sockets. Regular users don't have access to raw sockets because there 
are all kinds of nasty networking tricks that could be done.


Reply to: