Network Manager helps you configure your network settings easily in Ubuntu. Without it, most people won’t be able to assign IP or DNS addresses. One down side with using Network Manager is any user can turn off networking for everybody. Once networking turned off or disabled, no one will be able to access the Internet or network resources without first turning it on. Having regular users disabling and enabling networking in Ubuntu isn’t a good idea when using a public computer. So, this brief tutorial will show you how to limit access to Network Manager so that only the root user can turn off or disable networking in Ubuntu. When this feature is enabled, regular users will be required to enter the root or admin password the make changes to Network Manager.
- Prevent Regular Users from Turning Off Network Manager in Ubuntu 11.10
To get started, press Ctrl – Alt – T on your keyboard to open Terminal. When it opens, run the commands below to create a new policy file.
sudo gedit /var/lib/polkit-1/localauthority/50-local.d/networkmanager.pkla
Then copy and paste the content below into the file and save it.[NetworkManager1]Identity=unix-group:usersAction=org.freedesktop.NetworkManager.network-controlResultAny=noResultInactive=noResultActive=auth_admin_keep
Save the file and you’re done.
Finally, add all user accounts you want to limit to the users group by running the commands belowsudo adduser <username> users
All users who are added to the users group will need the root or admin password to disable networking.