Results 1 to 5 of 5

Thread: PolicyKit gui?

  1. #1
    Join Date
    Sep 2008
    Posts
    2,997

    Default PolicyKit gui?

    Using openSUSE 13.2 x32
    I wanted to disable root password when mounting partitions so I did a little googling, the best answer was changing the PolicyKit, an old openSUSE manual suggests that there are several GUI's for changing policies
    https://doc.opensuse.org/documentati...licykit.change
    I can't seam to find them, has PolicyKit been dropped, can you guys suggest a way to disable filemanagers asking for root when I want to mount a windows partition?

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,187
    Blog Entries
    1

    Default Re: PolicyKit gui?

    Polkit replaced PolicyKit a long time ago. If you don't mind CLI configuration, you can add custom entries to /etc/polkit-default-privs.local, and then run
    Code:
    set_polkit_default_privs
    IIRC, the relevant policies for mounting are 'org.freedesktop.udisks2.filesystem-mount' and 'org.freedesktop.udisks2.filesystem-mount-system'

    A list of policies can be got from
    Code:
    pkaction
    Code:
    pkaction --verbose
    For example, I have the following custom policies set
    Code:
    cat /etc/polkit-default-privs.local
    #
    # /etc/polkit-default-privs.local
    #
    # This file is used by set_polkit_default_privs to check or set
    # the implicit default privileges granted by PolicyKit
    #
    # In particular, this file will not be touched during an upgrade of the
    # installation. It is designed to be a placeholder for local
    # additions by the administrator of the system.
    #
    # Note that you need to run /sbin/set_polkit_default_privs for
    # changes to take effect.
    #
    # Format:
    # <privilege> <any>:<inactive>:<active>
    #
    org.freedesktop.udisks2.filesystem-mount auth_admin:yes:yes
    org.opensuse.cupspkhelper.mechanism.printeraddremove auth_admin:yes:yes
    It is also possible to define rules in /etc/polkit-1/rules.d/, but I've never bothered to investigate that.

    More info here
    Code:
    man polkit

  3. #3
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: PolicyKit gui?

    So no GUI for polkit ah well, it's konsole then.
    Tanks for the info, I don't really mind cli tools but I can't remember all their switches and syntax that's why I prefer gui's.

  4. #4
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: PolicyKit gui?

    I ended up creating this file
    /etc/polkit-1/rules.d/10-udisks2.rules
    Code:
    // See the polkit(8) man page for more information
    // about configuring polkit.
    
    // Allow udisks2 to mount devices without authentication
    // for users in the "storage" group.
    polkit.addRule(function(action, subject) {
        if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
             action.id == "org.freedesktop.udisks2.filesystem-mount") &&
        subject.isInGroup("storage")) {
            return polkit.Result.YES;
        }
    });
    with yast I created a new storage group and added myself to it.
    Now I can mount windows partitions without being asked for root password (tested with dolphin and nemo both work fine)

    ps. I followed this arch thread
    https://bbs.archlinux.org/viewtopic.php?pid=1187768

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,187
    Blog Entries
    1

    Default Re: PolicyKit gui?

    Yes, I've seen that wiki page you linked to. Well done.

Posting Permissions

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