On my end it only happens on WSL1. Not WSL2 with systemd enabled. It happens in the postinst script of systemd, that uses the binary systemd-sysusers. It is in this binary the bug happens. It can be reproduced by just running the systemd-sysusers binary. It seems to be a problem for systemd version 254.1 or newer.
Similar bug as reported in wsl, with kali back when systemd got updated to 254-1: https://github.com/microsoft/WSL/issues/10397 ** Bug watch added: github.com/microsoft/WSL/issues #10397 https://github.com/microsoft/WSL/issues/10397 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2069555 Title: Failed to take /etc/passwd lock: Invalid argument on upgrade To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2069555/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs