Run ifconfig without sudo
If any non root user would be trusted to do so, you can merely add a setuid flag on ifconfig exec:
chmod 4755 /sbin/ifconfig
It will grant root privilege for execution of this executable to anyone. Of course, you need to have root access to run the chmod.
You don't need to use sudo
to run the ifconfig
command, just make sure that the /sbin
is on your PATH .
as an unprivileged user run:
export PATH=$PATH:/sbin
ifconfig