Results 1 to 4 of 4

Thread: Grant rights to change network to normal users?

  1. #1
    Join Date
    Sep 2006
    Location
    Holland
    Beans
    344

    Grant rights to change network to normal users?

    Hi all,

    I have been looking for awhile now for a sollution to this specific problem: My users (ubuntu 12.04) should be able to change network settings on their laptops, without typing the admin password (which they don have). Found many guides, but none specifically give me an answer to my problem, and many don work... I could go and study on this, but it would be so much easier if you already know how to do this

    I DO NOT want them all to know the admin password, and I don want to get called out every day just to set a new network for them.

    So, is there a way to just give them all rights to just the network settings?

    SOLVED! see my post below, it works...


    thanks!
    Last edited by Ashrael; May 2nd, 2013 at 04:59 PM. Reason: solved!
    "Umuntu ngumuntu ngabanye bantu" - Xhosa saying.
    (People are people because of other people)

  2. #2
    Join Date
    Jan 2007
    Location
    Location: Location:
    Beans
    1,246
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grant rights to change network to normal users?

    http://thenubbyadmin.com/2012/04/11/...ific-commands/ <-- this is probably what you're looking for

    username ALL=(ALL) NOPASSWD: /usr/bin/network-manager
    clear && echo paste url and press enter; read paste; (youtube-dl $paste) | zenity --progress --title="" --text "Downloading, please wait" --auto-close --pulsate && ans=$(zenity --file-selection); gnome-terminal -x mplayer "$ans"

  3. #3
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Grant rights to change network to normal users?

    This may work for you (from a previous thread)

    Quote Originally Posted by steeldriver View Post
    I've struggled with this several times in the past, just made another attempt and there does seem to be at least one workaround

    1. If you just select one of the available networks from the nm-applet list and try to connect to it, a non-privileged user will get a popup saying "System policy prevents modification of networks for all users". The only option is to 'Cancel'. This seems to be because the default for any connection creation operation is 'Available for all users' which implies write permission to the /etc/NetworkManager directory

    2. Likewise if you select Edit connections --> Wireless --> Add, the dialog box comes up with the 'Available to all users' box checked - and greyed out! With this box checked, it is impossible for a non-privileged user to save the new connection.

    3. The 'Available to all users' box only becomes editable after you type something into the SSID box - you can then uncheck it and fill in the SSID and any Wireless Security tab / IPv4 / IPv6 details

    4. You should then be able to go back and select the SSID from the list, and it *should* connect - if not, make sure the 'Connect automatically' box is checked and then try disabling and re-enabling wireless

    I just tried this as an unprivileged user on my laptop running 12.04 and it does seem to work - yes it's very confusing and ugly, even the developers seem confused by it --> https://bugs.launchpad.net/ubuntu/+s...er/+bug/964705

    You will find another workaround on the web that involves modifying the network-manager polkit file - however I *think* that method allows unprivileged users to modify *any* connection (not just to add their own) and possibly allows them to see any stored wireless passphrases.

  4. #4
    Join Date
    Sep 2006
    Location
    Holland
    Beans
    344

    Re: Grant rights to change network to normal users?

    Hi all, thanks for the replies.

    @|{urse : Too dangerous...
    @ Steeldriver : didn't work for me....

    I found a really simple way to get where I want to be:

    just edit: /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

    and change:

    [Adding or changing system-wide NetworkManager connections]
    Identity=unix-group:admin;unix-group:sudo
    Action=org.freedesktop.NetworkManager.settings.mod ify.system
    ResultActive=yes

    to:

    [Adding or changing system-wide NetworkManager connections]
    Identity=unix-group:admin;unix-group:sudo;unix-group:users
    Action=org.freedesktop.NetworkManager.settings.mod ify.system
    ResultActive=yes

    and in terminal do a: adduser YOURUSERNAME users

    Reboot and you're done...
    "Umuntu ngumuntu ngabanye bantu" - Xhosa saying.
    (People are people because of other people)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •