You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating two consecutive Podman Machines, the first being being --rootful=false and the second being --rootful=true, podman machine ssh does not honor the rootful status of the second machine.
Steps to reproduce the issue
Steps to reproduce the issue
podman machine init foo
podman machine init --now --rootful bar
podman machine inspect bar --format '{{ .Rootful }}'
Looking at the code it reads the remote username from the default connection if there was no VM given as arg,
however in all other cases it uses the machine ssh config RemoteUsername which is always set to the user not root.
So the code likely needs to check HostUser.Rootful first and then use root as name when it is a rootful machine.
i.e. you can see this behavior with just the default machine
$ bin/podman machine ssh id
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
$ bin/podman machine ssh podman-machine-default id
uid=1000(core) gid=1000(core) groups=1000(core),4(adm),10(wheel),16(sudo),190(systemd-journal) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Issue Description
When creating two consecutive Podman Machines, the first being being
--rootful=false
and the second being--rootful=true
,podman machine ssh
does not honor the rootful status of the second machine.Steps to reproduce the issue
Steps to reproduce the issue
podman machine init foo
podman machine init --now --rootful bar
podman machine inspect bar --format '{{ .Rootful }}'
podman machine ssh bar whoami
Describe the results you received
Describe the results you expected
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Additional information
No response
The text was updated successfully, but these errors were encountered: