"/etc/init.d/networking restart" with non-root user

Posted by bonchen on Ask Ubuntu See other posts from Ask Ubuntu or by bonchen
Published on 2012-12-07T18:24:05Z Indexed on 2012/12/08 17:21 UTC
Read the original article Hit count: 543

Filed under:
|
|

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?

Thanks!

© Ask Ubuntu or respective owner

Related posts about networking

Related posts about restart