Bug 817395 - su: pam_systemd(su:session): Failed to create session
su: pam_systemd(su:session): Failed to create session
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-29 13:08 EDT by Donald Cohen
Modified: 2015-03-02 08:28 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-05 06:57:13 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Donald Cohen 2012-04-29 13:08:04 EDT
I've been noticing that this appears every day in my log watch:
 --------------------- Connections (secure-log) Begin ------------------------  
                                
                                               
 **Unmatched Entries** 
    su: pam_systemd(su:session): Failed to create session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.: 1 Time(s)   

And, in fact, I find it also in /var/log/secure.

What does it mean?  What is pam_systemd trying to do and why?
Do I even need it?  If so, why?  If not, how can I turn it off?
Comment 1 Lennart Poettering 2012-09-14 10:30:39 EDT
Is this still a problem?

(In reply to comment #0)
> I've been noticing that this appears every day in my log watch:
>  --------------------- Connections (secure-log) Begin
> ------------------------  
>                                 
>                                                
>  **Unmatched Entries** 
>     su: pam_systemd(su:session): Failed to create session: Did not receive a
> reply. Possible causes include: the remote application did not send a reply,
> the message bus security policy blocked the reply, the reply timeout
> expired, or the network connection was broken.: 1 Time(s)   
> 
> And, in fact, I find it also in /var/log/secure.
> 
> What does it mean?  What is pam_systemd trying to do and why?
> Do I even need it?  If so, why?  If not, how can I turn it off?

pam-systemd registers logins session with systemd-logind. This creates a cgroup for each user, which is useful to track and later kill his processes. It also is necessary to handle user device management. You can disable it if you really want to via "systemctl systemd-logind.service". But this has various negative effects, for example all your user sessions will be attributed to sshd (if you logged in via sshd), and user device management will break, gdm won't run anymore and so on.
Comment 2 Donald Cohen 2012-09-14 13:40:58 EDT
yes, it still happens
The next reply still leaves a lot of questions.
How can I find what application is failing to create a session?
How can I determine what causes the failure?  If the message bus
security policy is blocking it, why doesn't it put something into 
the log to tell me why?
So far I don't know what a cgroup is or why this is relevant to 
the message at all.
Comment 3 Lennart Poettering 2013-01-14 15:55:37 EST
Usually you should see PAM related messages from the client side, too in auth.log/secure, do you see anything there?
Comment 4 Donald Cohen 2013-01-15 11:38:34 EST
I'm kinda lost here - I don't know what's the client and what's the server.
The message I showed originally does appear in /var/log/secure as well as logwatch.  I don't see any auth.log.  Neither does locate.
Comment 5 Lennart Poettering 2013-01-15 17:15:16 EST
pam_systemd is the client code for the server systemd-logind. pam_systemd is a loadable module that is loaded into the authenticating service as part of PAM, i.e. in this case su.

Normally both the authenticating service (i.e. in this case su), and the logind service should log about this.

Now, what I wrote in #3 actually doesn't make any sense... ;-) You already pasted the client side's output (i.e. su's), i was now interested in logind's (server side) output too.
Comment 6 Donald Cohen 2013-01-15 18:56:21 EST
If you're trying to de-confuse me it's not working.  But if you think this is related to su that's a useful hint.  The timestamps do seem to correspond to a cron job that uses su but it looks to me like that su is working.

So where would I find this server side log?  Or if its logging is not turned on, how can I turn it on?
Comment 7 Lennart Poettering 2013-01-15 20:09:47 EST
So, let me get this right: you have system cronjob that uses su internally. is that correct?

maybe i can reproduce this
Comment 8 Donald Cohen 2013-01-15 20:58:01 EST
Yes.
(Is there some other way of running a cron job as a user?)
Comment 9 Lennart Poettering 2013-01-15 22:07:56 EST
(In reply to comment #8)
> Yes.
> (Is there some other way of running a cron job as a user?)

Yes, there is. the kind you edit with "crontab -e" run as user.

But su should work in a system cronjob, so we really should fix that.
Comment 10 Fedora End Of Life 2013-01-16 12:43:30 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 11 Fedora End Of Life 2013-12-21 03:35:29 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 12 Mohammad Emami 2014-01-19 12:27:16 EST
I see this bug in my Fedora 20!!!
see journalctl -f reading:
Jan 19 20:46:33 localhost.localdomain dbus-daemon[6700]: dbus[6700]: [system] Failed to activate service 'org.freedesktop.login1': timed out
Jan 19 20:46:33 localhost.localdomain dbus[6700]: [system] Failed to activate service 'org.freedesktop.login1': timed out
Jan 19 20:46:33 localhost.localdomain dbus[6700]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
Jan 19 20:46:33 localhost.localdomain su[9952]: pam_systemd(su:session): Failed to create session: Activation of org.freedesktop.login1 timed out
Jan 19 20:46:33 localhost.localdomain su[9952]: pam_unix(su:session): session opened for user m.emami by m.emami(uid=0)
Comment 13 Mohammad Emami 2014-01-19 12:32:31 EST
My standard daemon for OpenERP project starts this python project and changes it's status to activating instead of active or failed or any other state for services and hangs of this state and you should terminate systemctl start openerp-server.service by your self with Ctrl+c, i guess this belongs to here bug because of forcing daemon to run service with openerp user and this long time in creating session leads to this bug, perhaps, I don't know exactly!
Comment 14 Mohammad Emami 2014-01-19 12:34:23 EST
my current kernel is: 3.11.10-301.fc20.x86_64
but i have installed newer kernels and they can not login to my OS at all.
Comment 15 Fedora End Of Life 2014-02-05 06:57:16 EST
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 16 Bill Gianopoulos 2015-03-02 08:05:00 EST
I do not seem to have permission to reopen.  I still see this issue with fedora 21. I will file a new bug.
Comment 17 Bill Gianopoulos 2015-03-02 08:28:13 EST
I filed Bug 1197716.

Note You need to log in before you can comment on or make changes to this bug.