Pam_warn messages with lightdm

On every login with lightdm I am getting these two pam_warn messages from systemd in the journal:

pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[lightdm] ruser=[<unknown>] rhost=[<unknown>]
pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8004 service=[systemd-user] terminal=[] user=[lightdm] ruser=[<unknown>] rhost=[<unknown>]

The system behaves just fine. I only noticed these message by accident. And they exist since a long time.

Every once in a while I see similar message from xfce4-screensaver-dialog:

pam_warn(xfce4-screensaver:account): function=[pam_sm_acct_mgmt] flags=0 service=[xfce4-screensaver] terminal=[:0] user=[matthias] ruser=[<unknown>] rhost=[<unknown>]

These warnings do not seem to harm but I want to get rid of them anyways. Any idea how to do that?

Have you got a .pam_environnement in your home directory ?
If yes you should delete it (or backup somewhere before delete if problem) and check if messages are still there.

No, I don’t.

In the meantime I learned that pam_warn is actually just a logging module. It writes user authentication info to the journal. This is for the purpose of notification but not warning.

Anyway, for me it is triggered via /etc/pam.d/other which comes with package pambase. So I would assume that most people have these notifications in the journal.

When I comment the pam_warn.so entries in /etc/pam.d/other the journal entries are gone.

#%PAM-1.0
auth      required   pam_deny.so
#auth      required   pam_warn.so
account   required   pam_deny.so
#account   required   pam_warn.so
password  required   pam_deny.so
#password  required   pam_warn.so
session   required   pam_deny.so
#session   required   pam_warn.so