On Tuesday 11 June 2002 9:55 pm, Ramin Alidousti wrote: > On Tue, Jun 11, 2002 at 09:40:53PM +0100, Antony Stone wrote: > > On Tuesday 11 June 2002 9:38 pm, Tony Earnshaw wrote: > > > tir, 2002-06-11 kl. 14:53 skrev Antony Stone: > > > > ping $IP -c1 >/dev/null 2>&1 > > > > grep $IP /proc/net/arp | tr -s ' ' | cut -d' ' -f4 > > > > > > > > (There's a single space in between each of those pairs of ' ', in > > > > case it's not obvious.) > > > > > > Did you say 'arp -a'? > > > > I would have done, if I knew I was root, but the commands I suggested > > work for an unprivileged user too :-) > > If that information can be read by anybody then the wrapper program like > arp can be run by anybody as well ;-)
Well, on my system at least (Slackware 8.0), /proc/net/arp has permissions -r--r--r-- so anyone can read it. The arp program is in /sbin, so it can only be run by root. Antony.
