Bug#1037044: Forced password reset leaves behind failed user at .service unit

Jason Franklin jason at oneway.dev
Fri Jun 2 18:22:02 BST 2023


Package: systemd
Version: 252.6-1
Severity: normal

Greetings:

It appears that user at .service is left in a failed state when a user logs
in over ssh and is forced to reset their password due to expiration.

I was able to regularly reproduce this behavior with the process
described below.

# Create a test user.
$ sudo adduser fish
...

# Ensure no failed units.
$ systemctl list-units --failed
...

# Expire the user's password.
$ sudo passwd -e fish

# Log in via ssh. Properly change the user's password when prompted.
$ ssh fish at localhost
...
# Here, you will be kicked back out to your prompt after the new
# password is set.

# Now, note that a failed unit for the user is left behind.
$ systemctl list-units --failed
  UNIT               LOAD   ACTIVE SUB    DESCRIPTION
* user at 1001.service  loaded failed failed User Manager for UID 1001
...

I think the above accurately describes the behavior I'm seeing.

It seems odd to me that the failed service lingers even though the
user's password has been changed correctly, without any real failures in
the process. The user is now able to log in and what not, but systemd
indicates a failure.

This is an issue for me because these failures can stack up on systems
at my work, and monitoring of failed units then indicates a problem
where there is not one.

Please let me know any thoughts on this. It could be another piece of
software that's causing the error. Or, it could be that I have something
improperly configured or that I am misinterpreting things.

Many thanks,

-- 
Jason Franklin



More information about the Pkg-systemd-maintainers mailing list