I am the only user on my machine, and prefer not to type sudo
every time I use dhclient
. Therefore, I tried sudo chmod u+s /sbin/dhclient
.
However, when I subsequently run dhclient wlan0
from a non-root shell, I still get RTNETLINK answers: Operation not permitted
I am running Ubuntu 13.10
.
Why does setting the UID
bit not achieve the desired effect, and are there any workarounds?
sudo chmod u+s /sbin/ip
as well.dhclient
runs the shell script/usr/sbin/dhclient-script
, and shells invoked with uid != euid generally drop their privileges down to the uid. The error message you see, according to my testing, is from/sbin/ip
, which is run by the shell script and thus with your (non-root) uid.