1

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!

1 Answer 1

1

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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .