On 26 May 2018 at 17:17, François Patte
<francois.pa...@mi.parisdescartes.fr> wrote:
> Bonjour,
>
> I want to be able to open a crypted device as a non-root user and I
> modified the file
>
> /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy
>
> in order to do that.
>
> That works, but it is not a good thing to modify a file from the distrib
> to create a local configuration.
>
> There is an empty directory /etc/udisks2/modules.conf.d where I tried to
> guess what I could put inside for my purpose, but everything failed.
>
> I did not find a clear doc about the udisks2 configuration.
>

You need a polkit rule; create a text file,
/etc/polkit-1/rules.d/filename.rules, and put something like this in
it:

polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.udisks2.encrypted-unlock") &&
    subject.local &&
    subject.active &&
    subject.isInGroup("YOUR_USER_GROUP") ) {
            return polkit.Result.YES;
    }
});

`man polkit` for more details, and there are many examples in
/usr/share/polkit-1/rules.d/* .

Good luck.

-- 
Ahmad Samir
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/message/XU4ARC7QQYTJTUOTMPRLXVF22RXCSFFH/

Reply via email to