Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a thin client with 112mb RAM which boots ubuntu server 12.04.1 from a usb drive with openbox and it is to be used by students to communicate with cisco equipment. And because of this the students need to be able to reconfigure the network interface and then restart it without a reboot using the only user - cisco.

This is what I have so far:

adduser cisco
usermod -a -G dialout cisco
chown root:cisco /etc/network/interfaces
chmod 664 /etc/network/interfaces
chmod u+s /sbin/shutdown
chmod u+s /sbin/reboot
chmod u+s /sbin/poweroff
chmod u+s /run/network/if*
chmod u+s /sbin/ifdown
chmod u+s /sbin/ifup

And when I run /etc/init.d/networking restart as cisco I get:

*Reconfiguring network interfaces...
rm: cannot remove `eth0.dhclient': Permission denied
Failed to send flush request: Operation not permitted
RTNETLINK answers: Operation not permitted

Any ideas on how to get this working?


share|improve this question
up vote 0 down vote accepted

You need to add proper sudo rights to the cisco user. Create one file in /etc/sudoers.d/ as root, named cisco, and with the following one line content:

cisco ALL=NOPASSWD: /etc/init.d/networking

Also change the access rights to read-only:

sudo chmod 440 /etc/sudoers.d/cisco

More the Ubuntu way would be to use the sudo service networking restart logic, but I do not know how to add this to sudoers file.

share|improve this answer
Works like a charm. Thanks! – bonchen Dec 8 '12 at 11:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.