On Sat, May 13, 2023 at 06:02:18PM +0800, Jeremy Ardley wrote: > > On 13/5/23 17:57, Vincent Lefevre wrote: > > Moreover, it should not be necessary to be root: you are just > > reading non-private data. However, "list countries" does not > > seem to exist. > > Debian 11 seems to have a different opinion on who can run ifconfig. Sudo or > root is required.
Nonsense. > jeremy@client:~$ ifconfig enp8s0 > bash: ifconfig: command not found > jeremy@client:~$ sudo ifconfig enp8s0 > enp8s0: flags=4098<BROADCAST,MULTICAST> mtu 1500 > ether 0c:9d:92:75:b4:f7 txqueuelen 1000 (Ethernet) > RX packets 0 bytes 0 (0.0 B) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 0 bytes 0 (0.0 B) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 You achieve the same effect as regular user if you say /sbin/ifconfig. That's because sudo is in /sbin (or, perhaps, in /usr/sbin, for the young'uns), which by default isn't in a regular user's PATH. That's all. That's not an "opinion" of Debian (I had that already in HP/UX around 1995 or so). Only if you try to do root-y things (change an interface's IP, for example) you'll need root privileges. Cheers -- t
signature.asc
Description: PGP signature