This reverts to the pre-1.2 behaviour if getent can't find the user's home directory. This can happen if the system nsswitch.conf has been modified (to use LDAP, SSSD, or others) and NSCD is not running to the system to act as a proxy to the snaps.
Cherry-pick from main