Could you comment on how this solution using logind takes care of tasks that simply switch info a users context without the user actually being logged in? AFAICS, this problem is not solved using the logind approach, see description: (In reply to Joschi Brauchle from comment #12) > Please note, that the initial problem of this bug report is caused by an > existence problem of the /run/user/<ID> directory, which is only created on > login of a specific user. Patching cifs.upcall will only solve the problem > for this specific application. > > In general, the problem is that the /run/user/$UID directory is only created > (by SSSD or PAM) if the user $UID is logged in. But ANY process that uses > 'su' to change to user $UID MAY thus fail accessing, as the directory MAY be > missing. > > See BNC#899118 for example, where a program running as root needs to change > userid and acquire KRB kredentials for that userid. The program fails to > STORE the acquired kredentials because that userid has never logged into the > system before and the /run/user/$UID dir is missing. This is very likely for > servers in large environments.