cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
11.2k stars 1.11k forks source link

Sudo: unable to run /nonexistent/libexec/cockpit-askpass when trying to get admin access #20464

Open GreatBigWhiteWorld opened 5 months ago

GreatBigWhiteWorld commented 5 months ago

Explain what happens

  1. Setup cockpit server on a home server with opensuse leap 15.5
  2. Connect to the server with a PC in the same LAN using web browser at "https://ip:9090"
  3. Login fine with regular user account on the home server.
  4. Click on "Turn on administrative access", get error pop window saying "Problem becoming administrator Sudo: unable to run /nonexistent/libexec/cockpit-askpass: No such file or directory sudo: no password was provided sudo: a password is required"

Version of Cockpit

309

Where is the problem in Cockpit?

Overview

Server operating system

openSUSE

Server operating system version

leap 15.5

What browsers are you using?

No response

System log

No response

jelly commented 5 months ago

How did you setup Cockpit via the opensuse package or your own build?

GreatBigWhiteWorld commented 5 months ago

How did you setup Cockpit via the opensuse package or your own build?

From opensuse's repo: https://download.opensuse.org/repositories/systemsmanagement:/cockpit/15.5/ I also confirmed that the installed package cockpit-bridge provides mentioned file at '/usr/libexec/cockpit-askpass'. Not sure why it was said '/nonexistent/..../cockpit-askpass'.

theholypumpkin commented 5 months ago

Hello, same issue here. I too installed the package from the openSUSE repository.

NRic00 commented 5 months ago

For all your information: Cockpit is currently not officially supported for all openSUSE distributions, it is however supported for Tumbleweed. (see: https://software.opensuse.org/package/cockpit) All current packages for cockpit on SUSE Leap are either unofficial, or in testing. The stable Cockpit package release is expected to arrive with Leap 15.6, likely sometime next month. (see: https://news.opensuse.org/2024/04/29/try-cockpit-in-leap-rc/) If the SUSE team has not contacted the cockpit project already, this is most likely a problem on SUSE's side, especially considering it works already on Tumbleweed. This problem is also known on SUSE's end. (see: https://bugzilla.suse.com/show_bug.cgi?id=1223533)

You can currently install and use Cockpit on SUSE Leap, however hiccups are to be expected. For the record, I am having the same issue at the moment.

Nykseli commented 5 months ago

Hi!

Just like @NRic00 said, Cockpit is not really supported on Leap 15.5 and older and it should be supported on 15.6.

Looking into this is on my TODO list after we get the Cockpit building again on OBS (https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit).

GreatBigWhiteWorld commented 4 months ago

Hi!

Just like @NRic00 said, Cockpit is not really supported on Leap 15.5 and older and it should be supported on 15.6.

Looking into this is on my TODO list after we get the Cockpit building again on OBS (https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit).

Any update on this? I immediately tried cockpit when Leap 15.6 released, but it's the same error.

Nykseli commented 4 months ago

We have found a fix for it and just waiting for the fixed to get merged into Leap!

https://build.opensuse.org/request/show/1180402

mars-json commented 4 months ago
NAME="openSUSE Leap"
VERSION="15.6"

Fresh-installed system.

Problem becoming administrator
Sudo: unable to run /nonexistent/libexec/cockpit-askpass: No such file or directory sudo: no password was provided sudo: a password is required

Cockpit installed using sudo zypper in cockpit in CLI.

suse-srv:~ # zypper info cockpit
Information for package cockpit:
--------------------------------
Repository     : Main Repository
Name           : cockpit
Version        : 309-bp156.1.7
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 58.2 KiB
Installed      : Yes
Status         : up-to-date
Source package : cockpit-309-bp156.1.7.src
Upstream URL   : https://cockpit-project.org/
Summary        : Web Console for Linux servers
mars-json commented 4 months ago

Any update on this? I immediately tried cockpit when Leap 15.6 released, but it's the same error.

Same here. Confirm problem is present in OpenSUSE Leap 15.6

mars-json commented 4 months ago

I deleted root from /etc/cockpit/disallowed-users and can confirm, that I can login to Cockpit on OpenSUSE Leap as root, with administrative privilegies.

GreatBigWhiteWorld commented 4 months ago

I deleted root from /etc/cockpit/disallowed-users and can confirm, that I can login to Cockpit on OpenSUSE Leap as root, with administrative privilegies.

It is said to be in the process of fixing. I don't think it's safe to enable root login directly?

mars-json commented 4 months ago

It is said to be in the process of fixing. I don't think it's safe to enable root login directly?

It is my test lab at home. Fedora/Rocky Linux hosts have remote root access in my lab, so it's not a problem.

okynos commented 4 months ago

Hello,

Just a workaround meanwhile: sudo ln -s /usr/lib/cockpit-askpass /usr/libexec/ This will solve the problem but don't forget to remove the link before update the package when fixed.

PD: Remember to restart the app with: sudo systemctl restart cockpit

enthalpie91 commented 2 months ago

I confitm the bug is still present with leap 15.6 and deletec root from /etc/cockpit/disalowed-user is fine and solved the problem best regards