Skip to content

Conversation

@VallariAg
Copy link
Member

"AUDIT_WRITE" fixed the issue of ssh-ing from teuthoology to testnode for only root user :(
When trying to ssh to "ubuntu" user of testnode, it fails. I get the following error in journal logs of the testnode:

Feb 23 08:44:25 8e6e0f8cb66c sshd[147]: Accepted publickey for ubuntu from <IP> port <PORT> ssh2: RSA SHA256: <public key fingerprint>
Feb 23 08:44:25 8e6e0f8cb66c sshd[147]: pam_loginuid(sshd:session): Error writing /proc/self/loginuid: Operation not permitted
Feb 23 08:44:25 8e6e0f8cb66c sshd[147]: pam_loginuid(sshd:session): set_loginuid failed
Feb 23 08:44:25 8e6e0f8cb66c sshd[147]: pam_systemd(sshd:session): Failed to create session: Unit systemd-logind.service is masked.
Feb 23 08:44:25 8e6e0f8cb66c sshd[147]: pam_unix(sshd:session): session opened for user ubuntu by (uid=0)
Feb 23 08:44:25 8e6e0f8cb66c sshd[147]: error: PAM: pam_open_session(): Cannot make/remove an entry for the specified session

Podman's documentation to troubleshoot above problem:
https://github.com/containers/podman/blob/main/troubleshooting.md#33-the-sshd-process-fails-to-run-inside-of-the-container

I got a successful run for teuthology:no-ceph suite with "quay.io/ceph-infra/teuthology-dev:devstack-simplified" after this change.

This fixes the following issue:
Unable to ssh from teuthology container to testnode
using "ubuntu" user. Testnode journal sshd logs show:
`sshd[147]: pam_loginuid(sshd:session): Error writing /proc/self/loginuid: Operation not permitted`

solution ref: https://github.com/containers/podman/blob/main/troubleshooting.md#33-the-sshd-process-fails-to-run-inside-of-the-container

Signed-off-by: Vallari Agrawal <val.agl002@gmail.com>
@zmc zmc force-pushed the add-audit-control branch from 8d27a37 to 1ecbdc7 Compare February 5, 2025 19:01
@zmc zmc merged commit 67d8081 into ceph:main Feb 5, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants