doktor5000 wrote: No point in arguing with really smart people ...
I'm not pretending I'm smart but I was expecting a more helpful and supporting welcome, and after all you don't know me, maybe I can have some ideas too. But let's forget it, my english is not very good and maybe I didn't understand you right.
My point was not to disable polkit, my point was to change something in polkit settings, to see if it works better or has any effect, because in reality I don't know how polkit works, I just think that polkit is a tool that allows users not being root to run some tools as root with eventually a preliminary authentication. In a way, polkit allows not having to do "su -" or "sudo" to run commands that require privileges.
Then in my tests, changing the authentication in the security tool to disable the password request for software management (drakrpm) was only an example, as I said.
If I I go to that tool and change an authentication policy to "root password" for mageia update for example, then I get a request to enter root password when I try to run it from the menu, because it's the authentication I selected. But if I leave it to the default value, I'm not prompted for anything and it's not launched. So in that case the only solution I have then if I want to install a rpm is to log as root and run drakrpm, which is not satisfactory of course. I hope I'm clear.
I had a look at polkit documentation and saw what parameter files it uses but I don't understand everything at the moment.
I notice then that when I change something in the security tool, there is one row added to file :
/etc/polkit-1/rules.d/51-draksec.rules
Currently,my file is this :
- Code: Select all
# cat 51-draksec.rules
// This file is written by draksec. Do not edit.
var drakToolAuth = function(tool){switch (tool){
case 'draknetcenter': return polkit.Result.YES;
case 'drakrpm-editmedia': return polkit.Result.AUTH_ADMIN_KEEP;
case 'drakrpm-update': return polkit.Result.AUTH_SELF_KEEP;
case 'drakrpm': return polkit.Result.AUTH_ADMIN_KEEP;
}return polkit.Result.NOT_HANDLED;};
Every item I changed in the security tool has a line in this file and will be launched according to the authorisation rule defined in file (with or without prompt for password). The other commands will not run as user. For example, drakconf is not in this file, if I click on the MCC icon, nothing happens, if I run it from a console as user, I have the following message :
- Code: Select all
$ drakconf
Error executing command as another user: Not authorized
This incident has been reported.
But draknetcenter will run (without prompting password) :
- Code: Select all
$ draknetcenter
Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/lib/perl5/vendor_perl/5.20.1/Gtk3.pm line 296.
$VAR1 = [
bless( do{\(my $o = 83001200)}, 'Gtk3::TreePath' )
];
and drakrpm will be launched after prompting for root password, so as far as I understand, polkit works even if I disable password for one command.
My idea is that after the update to the new version of polkit, the default polkit rule that asks for user or root password doesn't work any more or is missing, certainly because of a precedence problem in the rules.
I have the problem with polkit again, that's why I could do these tests. (no, rebooting doesn't solve the problem nor restarting polkit service).
Maybe you will thing I'm wrong and I should just wait until the problem is solved, but I'm used to try to solve problems by myself and to try to understand things.
Thanks for your time if you have read this.