Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

We have several laptops at work which use Ubuntu 11.10 64bit.

I have our Wifi Access Point requiring WPA2-EAP Authentication (backed by a LDAP server).

I have the staff using these laptops when doing presentations by using the Guest Account.

So by default when you have a wifi card, network manager will display available Wireless Access Points.

So the logical course of action for a Novice(tm) user is to single left click the easy to use option in the Network Manager drop down list... At this point the Staff Member (who is logged in with the guest account) expects to just be able to connect and enter any authentication details if required.

But because they are using the Guest account, they won't ever have admin permissions (nor do I want them to), and so PolKit kicks in with a request for admin authorisation.

I solved this part by modifying the PolKit permissions required to allow all users to create System Network Connections...

However, because these Staff members are logging onto the Wifi Access Point with Ldap Credentials and because the Network Manager is now saving those credentials as a System Connection, their password is available for the next guest user session (because system connection profiles are stored in /etc/NetworkManager/system-connections.d/* ).

It creates system connections by default because "Available to all users" is ticked by default when you quickly connect to a new wifi access point.

I want Network Manager to not tick this by default. This way I can revert the changes I made to Polkit and users network connection profiles will be purged when they log out.

share|improve this question
add comment

1 Answer

A script to give NetworkManager Amnesia:

#!/bin/sh
# /etc/NetworkManager/dispatcher.d/01-die-nm-die.sh
# must be chowned to root:root, chmod +x
#
INTERFACE=$1 # The interface which is brought up or down
STATUS=$2 # The new state of the interface

case "$STATUS" in
    'up') # $INTERFACE is up
    # maybe do something
    ;;
    'down') # $INTERFACE is down
    # Check for active interface and down if no one active
    find /etc/NetworkManager/system-connections.d/ ! -name 'conn-i-want-to-keep' -exec rm {} \;
    ;;
esac
share|improve this answer
    
this actually destroys all root owned connection profiles... I actually want to specify that X user can not create network connection profiles which are "Available to all users" –  airtonix Mar 28 '12 at 11:28
    
i don't believe the option you are asking about exists, I modified the script to show how you specify network profiles to retain. also not sure what you mean by "root owned connection profiles", as everything in .../system-connections.d/ is 600 root:root. –  nathwill Mar 28 '12 at 15:10
    
you're not sure what I mean? Well, let's go over this. I described the scenario where NetworkManager makes it possible for connection profiles to be either "Root Owned" (in /etc/blah/blah" or "User Owned" (somewhere in users home or gconf/dconf). So when I reply with "this actually destroys all ROOT OWNED connection profiles", I was referring to the fact that idea you proposed would suprisingly.. delete all root owned connection profiles... –  airtonix Apr 3 '12 at 22:17
add comment

Your Answer

 
discard

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.