Hi
I added pam_systemd module in /etc/pam.d/login file.
# cat /etc/pam.d/login
auth requisite pam_nologin.so
auth required pam_securetty.so
auth required pam_env.so
auth required pam_unix.so nullok_secure
account required pam_access.so
account required pam_unix.so
session required pam_motd.so
session required pam_limits.so
session optional pam_mail.so dir=/var/mail standard
session optional pam_lastlog.so
session required pam_unix.so
password required pam_unix.so nullok md5 shadow
session optional pam_systemd.so
#
auth requisite pam_nologin.so
auth required pam_securetty.so
auth required pam_env.so
auth required pam_unix.so nullok_secure
account required pam_access.so
account required pam_unix.so
session required pam_motd.so
session required pam_limits.so
session optional pam_mail.so dir=/var/mail standard
session optional pam_lastlog.so
session required pam_unix.so
password required pam_unix.so nullok md5 shadow
session optional pam_systemd.so
#
Thank you,
-Sangeetha
On Tue, Feb 13, 2024 at 12:33 PM Andrei Borzenkov <arvidjaar@xxxxxxxxx> wrote:
On 13.02.2024 07:52, Sangeetha Elumalai wrote:
> Hi,
>
> The* 'loginctl list-users'* command isn't displaying the user list. I would
> appreciate any suggestions on resolving this issue. Do I need to enable any
> specific service for this functionality?
>
> Here are the logs:
> ```
> # who
> root ttyS0 Feb 15 19:12
> #
>
>
> # loginctl list-users
> No users.
> #
>
> # loginctl list-sessions
> No sessions.
> #
This implies that PAM service you use to login does not include
pam_systemd module.