YunoHost-Apps / cockpit_ynh

Cockpit package for YunoHost
https://cockpit-project.org/
GNU General Public License v3.0
8 stars 5 forks source link

Limited user access #17

Open Rubonnek opened 1 year ago

Rubonnek commented 1 year ago

Describe the bug

After logging into the cockpit UI, a user will be of limited access if the are not in the sudo group.

Context

Expected behavior

I expected to be able to somehow let users escalate privileges through the yunohost UI (i.e. to be able to add them to the sudo group through the UI)

There's no documentation either so I'm providing a workaround below.

Logs

N/A

Workaround

Open a terminal in yunohost and add the user to the sudo group:

sudo gpasswd -a myuser sudo
Rubonnek commented 1 year ago

I just noticed there's a failed User Manager for my user id.

Here's what I'm seeing through systemctl --failed:

  UNIT              LOAD   ACTIVE SUB    DESCRIPTION
● user@5137.service loaded failed failed User Manager for UID 5137

Could that be related?

danielo515 commented 1 year ago

your workaround worked for me, thanks

jcn50 commented 1 week ago

More than a year later I have the same issue: (and adding the $user to the sudo group does not fix) cockpit-limited-access

jcn50 commented 1 week ago

I just noticed there's a failed User Manager for my user id.

Here's what I'm seeing through systemctl --failed:

  UNIT              LOAD   ACTIVE SUB    DESCRIPTION
● user@5137.service loaded failed failed User Manager for UID 5137

Could that be related?

I have the same issue, I do not know how to fix....

jcn50 commented 1 week ago

OK I think I found the fix for this~ it is missing the cockpit-askpass file:

root@private:~# ls -lah /usr/lib/cockpit/cockpit-askpass
ls: cannot access '/usr/lib/cockpit/cockpit-askpass': No such file or directory

if you are missing this file too, the fix is this command:

apt reinstall cockpit-bridge cockpit-pcp && systemctl restart cockpit

I have no idea why that file is missing, my only assumption is that it is affecting OLD Yunohost instances (even though my old instance is up-to-date and completely upgraded), because I do not have this problem on a NEW one.

I am still getting the User Manager for UID 5137 failed service from above https://github.com/YunoHost-Apps/cockpit_ynh/issues/17#issuecomment-2193972541

jcn50 commented 1 week ago

@orhtej2 can you accept my change on the testing branch?.. I will revert if the fix worked!

jcn50 commented 1 week ago

Update: I found that failed service fix too~~ it took me a while to figure out where the problem was~ there is something to learn every day!