Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A Disable ability of users to enable lingering in systemd

Can I disable the ability of regular users to enable lingering in loginctl? By default every user on a systemd enabled Linux can run loginctl --enable-linger and have a personal systemd instance s...

1 answer  ·  posted 24d ago by GeraldS‭  ·  edited 22d ago by GeraldS‭

Question systemd logind
#3: Post edited by user avatar GeraldS‭ · 2024-10-30T12:49:11Z (22 days ago)
  • Can I disable the ability of regular users to enable lingering in loginctl?
  • By default every user on a systemd enabled Linux can run `loginctl --enable-linger` and have a personal systemd instance started that starts services in userspace after reboots. I have the need to disable this capability.
  • [`man logind.conf`](https://www.man7.org/linux/man-pages/man5/logind.conf.5.html) does not show anything helpful. Every search term I can think of only leads to instructions on how to use it.
  • The only thing I can currently think of would be to clean the folder `/var/lib/systemd/linger/` on shutdown, so they are gone when the system starts up next time. But that seems rather hacky. Is there any regular option to disable lingering?
  • Can I disable the ability of regular users to enable lingering in loginctl?
  • By default every user on a systemd enabled Linux can run `loginctl --enable-linger` and have a personal systemd instance started that starts services in userspace after reboots. I have the need to disable this capability.
  • [`man logind.conf`](https://www.man7.org/linux/man-pages/man5/logind.conf.5.html) does not show anything helpful. Every search term I can think of only leads to instructions on how to use it.
  • In a couple of places it has been suggested to clean the folder `/var/lib/systemd/linger/` on shutdown, so they are gone when the system starts up next time. But that seems rather hacky. Is there any regular option to disable lingering?
#2: Post edited by user avatar GeraldS‭ · 2024-10-28T10:32:24Z (24 days ago)
fixed a typo
  • Can I disable the ability of regular users to enable lingering in loginctl?
  • By default every user on a systemd enabld Linux can run `loginctl --enable-linger` and have a personal systemd instance started that starts services in userspace after reboots. I have the need to disable this capability.
  • [`man logind.conf`](https://www.man7.org/linux/man-pages/man5/logind.conf.5.html) does not show anything helpful. Every search term I can think of only leads to instructions on how to use it.
  • The only thing I can currently think of would be to clean the folder `/var/lib/systemd/linger/` on shutdown, so they are gone when the system starts up next time. But that seems rather hacky. Is there any regular option to disable lingering?
  • Can I disable the ability of regular users to enable lingering in loginctl?
  • By default every user on a systemd enabled Linux can run `loginctl --enable-linger` and have a personal systemd instance started that starts services in userspace after reboots. I have the need to disable this capability.
  • [`man logind.conf`](https://www.man7.org/linux/man-pages/man5/logind.conf.5.html) does not show anything helpful. Every search term I can think of only leads to instructions on how to use it.
  • The only thing I can currently think of would be to clean the folder `/var/lib/systemd/linger/` on shutdown, so they are gone when the system starts up next time. But that seems rather hacky. Is there any regular option to disable lingering?
#1: Initial revision by user avatar GeraldS‭ · 2024-10-28T10:30:18Z (24 days ago)
Disable ability of users to enable lingering in systemd
Can I disable the ability of regular users to enable lingering in loginctl?

By default every user on a systemd enabld Linux can run `loginctl --enable-linger` and have a personal systemd instance started that starts services in userspace after reboots. I have the need to disable this capability.

[`man logind.conf`](https://www.man7.org/linux/man-pages/man5/logind.conf.5.html) does not show anything helpful. Every search term I can think of only leads to instructions on how to use it.

The only thing I can currently think of would be to clean the folder `/var/lib/systemd/linger/` on shutdown, so they are gone when the system starts up next time. But that seems rather hacky. Is there any regular option to disable lingering?