5

I'd like to create a Debian VM with a guest login. The guest would be allowed to work with /etc/network/interfaces in order to configure the VM's IP, name, and so on. Is this possible to do? How?

From other posts and articles online, I get an impression that the user must be root in order to change the interfaces. Is there a workaround?

Roman Mik
  • 153

2 Answers2

6

Add the user to netdev group : The members of this group can manage network interfaces through the network-manager and wicd:

Add user:

adduser user_name_here netdev

Reload dbus:

/etc/init.d/dbus reload

Edit

This right is gained by adding the user to the netdev group:

On Debian, the "netdev" group gains access to using Network Manager. On Ubuntu, Network Manager access rights are gained by being at the system console, so the name of this entry in gnome-system-tools is misleading.

The "netdev" group can administer wicd and wpasupplicant.

The "netdev" group can set the avahi host name using DBus.

The "netdev" group can administer Bluetooth devices.

GAD3R
  • 3,900
0

Utilize sudo for this. Edit the sudoers file using the command 'visudo'. You can use something like the following:

User_Alias NETWORKING_USERS = guest1, guest2, ...

Cmnd_Alias NETWORKING_COMMANDS = /usr/bin/vim /etc/network/interfaces, /path/to/other/command args, ...

NETWORKING_USERS ALL= NOPASSWD: NETWORKING_COMMANDS

Then guest users can do:

sudo vim /etc/network/interfaces

or any other command you included using visudo. The NOPASSWD keyword is optional. If you prefer to have users enter their password, just remove it.