-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Using pkexec could fail if using ssh #4783
Comments
When I use pkexec over ssh, it asks for password in the terminal:
Why is it different on your system or in Meson? |
I think it requires a logind session, because it sure doesn't work for me over ssh. I successfully type in my password, then it complains about session cookies. I have literally never had a problem with sudo over ssh. Polkit unpredictably fails unless I obtain physical access to the device and log into a desktop. Then ssh works. Go figure. To add to the indignity, it used to complain I'm not authorized anyway, and I had to manually configure polkit to allow the wheel user to obtain privileges. I did so purely as an experiment to see if it could work, my system didn't preconfigure this at all. |
Sounds like bad polkit config and/or bugs, but it seems pretty common to not work indeed, judging from what I find in google. Possibly you need a session open on the machine you ssh, that was the case when I tried it at least. |
meson default to use pkexec if it's available in the system. However, pkexec needs two windows (see NixOS/nixpkgs#18012 (comment)) when running remotely via ssh. So it becomes very cumbersome to install a package in an ssh session.
Is it possible for the user to choose the privilege escalation (pkexec/sudo) method? Or use sudo whenever user is away from X.
The text was updated successfully, but these errors were encountered: