LXC container - SSH and Console Login fails

echtarg

New Member
Nov 11, 2022
2
0
1
Greetings:

We have an LXC container running the Rocky Linux 8 template provided by Proxmox. The config of the container has no special settings:

Code:
arch: amd64
cores: 2
hostname: OUR.HOST.NAME
memory: 2048
net0: name=eth0,bridge=vmbr0,firewall=1,gw=xxx.xxx.xxx.xxxx,hwaddr=xx:xx:xx:xx:xx:xx,ip=xxx.xxx.xxx.xxx/25,type=veth
onboot: 1
ostype: centos
rootfs: lxc.store.xx:vm-xxxxxx-disk-0,size=20G
swap: 2048
tty: 5
unprivileged: 1

The container was running without problems for several weeks.

Since yesterday we cannot login any more using SSH or the console. The only way to login is 'pct enter xxxx' from the Proxmox node. We have not done anything at the server. No updates, no changes, nothing.

The following error messages are shown:

in /var/log/messages:
Code:
Nov 10 21:55:05 host systemd[1]: Starting system activity accounting tool...
Nov 10 21:55:05 host systemd[1]: Stopping Login Service...
Nov 10 21:55:05 host systemd[1]: systemd-logind.service: Succeeded.
Nov 10 21:55:05 host systemd[1]: Stopped Login Service.
Nov 10 21:55:05 host systemd[1]: Starting Login Service...
Nov 10 21:55:05 host systemd[1]: sysstat-collect.service: Succeeded.
Nov 10 21:55:05 host systemd[1]: Started system activity accounting tool.
Nov 10 21:55:05 host systemd-logind[3709]: New seat seat0.
Nov 10 21:55:05 host systemd[1]: Started Login Service.
Nov 10 21:55:08 host systemd[1]: Created slice User Slice of UID 0.
Nov 10 21:55:08 host systemd[1]: Starting User runtime directory /run/user/0...
Nov 10 21:55:08 host systemd-logind[3709]: New session 1745 of user root.
Nov 10 21:55:08 host systemd[1]: Started User runtime directory /run/user/0.
Nov 10 21:55:08 host systemd[1]: Starting User Manager for UID 0...
Nov 10 21:55:08 host systemd[3713]: PAM failed: Permission denied
Nov 10 21:55:08 host systemd[3713]: user@0.service: Failed to set up PAM session: Operation not permitted
Nov 10 21:55:08 host systemd[3713]: user@0.service: Failed at step PAM spawning /usr/lib/systemd/systemd: Operation not permitted
Nov 10 21:55:08 host systemd[1]: user@0.service: Failed with result 'protocol'.
Nov 10 21:55:08 host systemd[1]: Failed to start User Manager for UID 0.
Nov 10 21:55:08 host systemd[1]: Started Session 1745 of user root.
Nov 10 21:55:08 host systemd[1]: session-1745.scope: Succeeded.
Nov 10 21:55:08 host systemd-logind[3709]: Session 1745 logged out. Waiting for processes to exit.
Nov 10 21:55:08 host systemd[1]: Stopping User runtime directory /run/user/0...
Nov 10 21:55:08 host systemd-logind[3709]: Removed session 1745.
Nov 10 21:55:08 host systemd[1]: run-user-0.mount: Succeeded.
Nov 10 21:55:08 host systemd[1]: user-runtime-dir@0.service: Succeeded.
Nov 10 21:55:08 host systemd[1]: Stopped User runtime directory /run/user/0.
Nov 10 21:55:08 host systemd[1]: Removed slice User Slice of UID 0.

and in /var/log/secure:
Code:
Nov 10 21:55:08 host sshd[3710]: Accepted password for root from xx.xx.xx.xx port 54460 ssh2
Nov 10 21:55:08 host sshd[3710]: pam_limits(sshd:session): Could not set limit for 'memlock': Operation not permitted
Nov 10 21:55:08 host systemd[3713]: pam_limits(systemd-user:session): Could not set limit for 'memlock': Operation not permitted
Nov 10 21:55:08 host systemd[3713]: pam_unix(systemd-user:session): session opened for user root by (uid=0)
Nov 10 21:55:08 host sshd[3710]: pam_unix(sshd:session): session opened for user root by (uid=0)
Nov 10 21:55:08 host sshd[3710]: error: PAM: pam_open_session(): Permission denied

I checked '/etc/pam.d/*' and '/etc/security/limits.conf' and everything is okay and with required permissions.

Can anyone help?

Thanks.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!