deluser does not clean up systemd files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
adduser (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
In
Description: Ubuntu 16.04.4 LTS
Release: 16.04
using
adduser package Version: 3.113+nmu3ubuntu4
systemd package Version: 229-4ubuntu21.10
deluser will not clean up data in /run/user/<uid> directory. If a user is created then under many circumstances, such as systemd enable-linger being called for the user, data for that user will exist in /run/user/<uid>. Running deluser for such as user will remove the user, home directory, etc. but not the /run/user data.
** Most importantly **, the next user creation will be given the open uid formerly held by the deleted user. The new user can then have broken systemd sessions so that the systemctl --user command will always fail with the error
Failed to connect to bus: No such file or directory
A system reboot seems to be the only thing that will reliably clean up the cruft in /run/user/<uid>
Expected behavior would be that if a user is successfully removed then there should be no directory remaining for that user's uid under /run/user.
tags: | added: xenial |