-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkexec doesn't work #72
Comments
Hi! pkexec is part of Polkit and is a better, safer way to ask for elevated privileges: https://wiki.archlinux.org/title/Polkit
Sounds like polkit may be improperly configured on your system. Are you by any chance trying to do this over ssh? Things you can do to help me print a more useful error message:
Things you can do to fix the problem:
|
The problem is that polkit requires an additional authentication daemon to be running, which it was not. Just because |
You're right and, if you want to help, I put a couple steps above that you can follow to get an error code from pkexec and print it here. |
I got it working, just telling you guys of the error in case you want to fix it. |
And I appreciate that, but I need more information to fix it, specifically the things I asked for above. No pressure though, if you're not interested in helping provide that info, you may just close this issue. |
It's exactly the same on any command. This is the output from the helper:
|
Great, thanks. Step 2 from my list of requested information is also crucial to my ability to make any changes that would fix this. |
Seeing the same with Fedora 38: Editing hosts file... This incident has been reported.` |
Please disregard. Reading up on polkit the reason it isn't working is because I'm using xmonad and it requires more configuration before it will work in this environment. |
@arbog If you're willing to help get an error code from Polkit, that's what I'd need to make the Helper provide a more useful error message to users. Instructions are in step 2 of this comment. |
Closing this for now. Would need the quested info to do anything further about it. |
Hi, same for me. I tried to write in /etc/polkit-1/rules.d/50-default.rules this: but new error: user@rootme:~/Games/lug-helper$ pkexec 'top' |
Solution to the issue starcitizen-lug#72. It's not very clean since I didn't really understand the core of the problem and its resolution... it's an 'implementation' of polkit-org/polkit#201.
@crocodile13 From everything I'm reading, it sounds like this is due to a misconfigured/outdated OS and/or extremely outdated version of polkit. Rather than add workarounds for a broken polkit, such as the one mentioned, I'd prefer to just gracefully fall back to sudo. In order to do that, I need pkexec's exit status code. If you're willing to help, please see my #72 (comment) above and perform step number 2 to get the error code for pkexec without your workaround. I can capture that and fall back to sudo. Thanks! |
I'm sorry, I'm quite surprised, I can't reproduce the bug o_o. I tried using -x, but without success... In the meantime, I updated Wine and Lutris to their latest release, could it be related? I tried cloning the repo from scratch again but it's still the same... 'unfortunately,' it works. If you have any ideas on what to remove to return to the initial state, feel free to let me know, I'd be happy to help... If I get motivated, I might set up a VM this evening. As for me, I didn't want to update polkit because there are too many 'critical' dependencies on the system... edit: I just try to downgrade wine and lutris.... no difference |
It's not likely anything to do with lutris or wine. You'd have to revert any workarounds or updates you performed on your system, potentially reboot, and then try again to reproduce the error |
Hello, sorry for the delay, I did a wrong manipulation and I deleted the /lib ... I completely reinstalled my OS to go to debian. I will do the manipulation during the week to see if the problem is also present here. |
I've made a change that hopefully will help improve the fallback to sudo, but without the relevant pkexec error code I can't be sure it would have helped with the misconfiguration issues above. I'll close this again for now unless someone can get me an error code. |
You guys default to
pkexec
to run commands at root, which doesn't work on my Arch linux distro:I usually use
sudo
on my system, I've never heard of pkexec.The text was updated successfully, but these errors were encountered: