I tried to reproduce this but it didn't fail for me, however a quick search seems to indicate this might be a problem not with systemd, but with pam, e.g.: https://github.com/proot-me/PRoot/issues/156#issuecomment-735011266
As you're using 18.04, which includes pam 1.1.8, the problem may be fixed for you if you try on a 20.04 system, which includes pam 1.3.1.
If that works, then there is likely some patch needed to be backported to pam in bionic.
I tried to reproduce this but it didn't fail for me, however a quick search seems to indicate this might be a problem not with systemd, but with pam, e.g.: /github. com/proot- me/PRoot/ issues/ 156#issuecommen t-735011266
https:/
As you're using 18.04, which includes pam 1.1.8, the problem may be fixed for you if you try on a 20.04 system, which includes pam 1.3.1.
If that works, then there is likely some patch needed to be backported to pam in bionic.