Discussion:
Missing kernel service for systemd causes user@0.service to fail
(too old to reply)
tedheadster
2018-02-15 01:05:56 UTC
Permalink
Raw Message
Team,
I have compiled my linux kernel using 'allnoconfig' and added back
in all the kernel options that have been documented as necessary for
systemd. I'm still getting an error. It fails trying to start
***@0.service, and it is related to PAM somehow.

Here is the debug log:

Feb 14 23:48:57 intel486 systemd[1]: ***@0.service: About to execute:
/lib/systemd/systemd --user
Feb 14 23:48:57 intel486 systemd[1]: ***@0.service: Forked
/lib/systemd/systemd as 111
Feb 14 23:48:57 intel486 systemd[1]: ***@0.service: Changed dead -> start
Feb 14 23:48:57 intel486 systemd[1]: Starting User Manager for UID 0...
Feb 14 23:48:57 intel486 systemd[1]: ***@0.service: User lookup
succeeded: uid=0 gid=0
Feb 14 23:48:57 intel486 systemd[111]: ***@0.service: Kernel keyring
not supported, ignoring.
Feb 14 23:48:57 intel486 systemd[111]: PAM failed: Function not implemented
Feb 14 23:48:57 intel486 systemd[111]: ***@0.service: Failed to set
up PAM session: Function not implemented
Feb 14 23:48:57 intel486 systemd[111]: ***@0.service: Failed at step
PAM spawning /lib/systemd/systemd: Function not implemented
Feb 14 23:48:59 intel486 systemd[1]: Received SIGCHLD from PID 111 ((systemd)).
Feb 14 23:48:59 intel486 systemd[1]: Child 111 ((systemd)) died
(code=exited, status=224/PAM)
Feb 14 23:48:59 intel486 systemd[1]: ***@0.service: Child 111 belongs
to ***@0.service
Feb 14 23:48:59 intel486 systemd[1]: ***@0.service: Main process
exited, code=exited, status=224/PAM
Feb 14 23:49:00 intel486 systemd[1]: ***@0.service: Failed with
result 'protocol'.
Feb 14 23:49:00 intel486 systemd[1]: ***@0.service: Changed start -> failed
Feb 14 23:49:00 intel486 systemd[1]: ***@0.service: Job
***@0.service/start finished, result=failed
Feb 14 23:49:00 intel486 systemd[1]: Failed to start User Manager for UID 0.

Trying to run this post-boot under strace did not get me any good leads.

What do you suggest to track this kernel configuration option down?

- Matthew
Mantas Mikulėnas
2018-02-15 08:19:16 UTC
Permalink
Raw Message
Post by tedheadster
Team,
I have compiled my linux kernel using 'allnoconfig' and added back
in all the kernel options that have been documented as necessary for
systemd. I'm still getting an error. It fails trying to start
/lib/systemd/systemd --user
/lib/systemd/systemd as 111
Feb 14 23:48:57 intel486 systemd[1]: Starting User Manager for UID 0...
succeeded: uid=0 gid=0
not supported, ignoring.
Feb 14 23:48:57 intel486 systemd[111]: PAM failed: Function not implemented
up PAM session: Function not implemented
[
]
Trying to run this post-boot under strace did not get me any good leads.
What do you suggest to track this kernel configuration option down?
Examine all modules listed in /etc/pam.d/systemd-user, and enable all
kernel options *those* modules might need.

`strace pamtester systemd-user $USER acct_mgmt open_session close_session`
might be a good method.
--
Mantas Mikulėnas
tedheadster
2018-02-15 15:27:57 UTC
Permalink
Raw Message
Post by tedheadster
/lib/systemd/systemd --user
/lib/systemd/systemd as 111
Feb 14 23:48:57 intel486 systemd[1]: Starting User Manager for UID 0...
succeeded: uid=0 gid=0
not supported, ignoring.
Feb 14 23:48:57 intel486 systemd[111]: PAM failed: Function not implemented
up PAM session: Function not implemented
[…]
Examine all modules listed in /etc/pam.d/systemd-user, and enable all kernel
options *those* modules might need.
`strace pamtester systemd-user $USER acct_mgmt open_session close_session`
might be a good method.
So far no luck with pamtester; everything worked:

/root # pamtester systemd-user root acct_mgmt open_session close_session
pamtester: account management done.
pamtester: successfully opened a session
pamtester: session has successfully been closed.
/root #

I will look at /etc/pam.d/systemd-user next.

- Matthew

Loading...