cockpit
cockpit copied to clipboard
Adding "localhost" Host Denies Access to Main Account
Explain what happens
- Login as johndoe
- Add new host
- Host: localhost User: janedoe
- User janedoe is automatically logged in whenever johndoe logs in.
In my case: "John Doe" is my main admin account. "Jane Doe" is a limited account for running a container in Podman without root access. In my specific case, I also have a second host running Debian 11/Cockpit 239 that can access the "John Doe" account properly.
Version of Cockpit
276.1
Where is the problem in Cockpit?
Navigation & Shell
Server operating system
other
Server operating system version
Rocky Linux 8
What browsers are you using?
Firefox
System log
No response
I managed to fix my immediate problem by editing /etc/cockpit/machines.d/99-webui.json to remove the problematic login over terminal.
I'm going to leave this issue as open though because this was a frustrating behavior to deal with. It behaved as expected when I used its IP (192.168.0.---).
Another update: connecting to 127.0.0.1 works similarly well to using its own IP from the local network.
I'm afraid I can't follow -- what exactly did you put into the "Add host" dialog, and what was the contents of /etc/cockpit/machines.d/99-webui.json? Can you still reproduce this?
In short: I'm after multi-login functionality for managing separate containerized projects. Loopback addresses work nicely for this purpose, but using the string "localhost" in place of an IP when connecting to another user would log my account directly into that user.
I'm not up to reproducing it right now (or more specifically fixing it afterwords), but here is a recreation of how I goofed it in the first place.