Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 56 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save charlyie/76ff7d288165c7d42e5ef7d304245916 to your computer and use it in GitHub Desktop.
Save charlyie/76ff7d288165c7d42e5ef7d304245916 to your computer and use it in GitHub Desktop.
# If Debian 11 is ran on a LXC container (Proxmox), SSH login and sudo actions can be slow
# Check if in /var/log/auth.log the following messages
Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)
-> Run systemctl mask systemd-logind
-> Run pam-auth-update (and deselect Register user sessions in the systemd control group hierarchy)
@Termuellinator
Copy link

I've now encountered this because i have to use a privileged container with debian 12. Unfortunately, this solution here prevents things like systemctl poweroff from working.

Fortunately, L1Cafe's link offers a better solution:

Comment out session optional pam_systemd.so in /etc/pam.d/common-session

This seems to solve the issue while keeping systemd-logind intact (haven't done much testing though!)

@maqdan
Copy link

maqdan commented Feb 15, 2024

it works, thank you

@dsbrown
Copy link

dsbrown commented Feb 28, 2024

This fixed my problem, thank you.

@umiddelb
Copy link

It's not possible to enable nesting in privileged containers though.

It's possible to turn on nesting after container creation: CT |-> Options |-> Features |-> Edit

@meulie
Copy link

meulie commented Apr 17, 2024

Thanks! 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment