Bug 1014285

Summary: lightdm-1.6.2 (through at least lightdm-1.7.17) does not maintain login history using /var/log/wtmp
Product: [Fedora] Fedora Reporter: major <major>
Component: lightdmAssignee: Rex Dieter <rdieter>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 19CC: christoph.wickert, dan.mashal, gregor, rdieter
Target Milestone: ---Keywords: Upstream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lightdm-1.4.5-2.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-12 04:26:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description major 2013-10-01 15:54:43 UTC
Logins using lightdm are not recorded in /var/log/wtmp and so no login history is maintained. For any system, the recording of logins is needed for basic security auditing. [G]dm and kdm, for example, both properly record to /var/log/wtmp.

Although /etc/pam.d/lightdm "includes" the "postlogin" pam file, /etc/pam.d/postlogin and /etc/pam.d/postlogin-ac (with authconfig) by default do not process wtmp entries. [A]uthconfig will overwrite any changes made to /etc/pam.d/postlogin-ac if enabling wtmp processing is attempted there. The policy seems to be that any wtmp processing is the responsibility of the display manager.

Enabling wtmp processing for lightdm can be achieved simply by adding an entry such as "session optional pam_lastlog.so silent" or something similar to /etc/pam.d/lightdm near the end of the file before "including" postlogin. The changes can be seen in the following commands and output.

#################
[root@chariot ~]# cat /etc/pam.d/lightdm
#%PAM-1.0
auth     [success=done ignore=ignore default=bad] pam_selinux_permit.so
auth       required    pam_env.so
auth       substack    system-auth
-auth       optional    pam_gnome_keyring.so
-auth       optional    pam_mate_keyring.so
auth       include     postlogin
account    required    pam_nologin.so
account    include     system-auth
password   include     system-auth
session    required    pam_selinux.so close
session    required    pam_loginuid.so
session    optional    pam_console.so
-session    optional    pam_ck_connector.so
session    required    pam_selinux.so open
session    optional    pam_keyinit.so force revoke
session    required    pam_namespace.so
-session    optional    pam_gnome_keyring.so auto_start
-session    optional    pam_mate_keyring.so auto_start
session    include     system-auth
session    include     postlogin

#################
[root@chariot ~]# sed -i -e 21i"session    optional    pam_lastlog.so silent" /etc/pam.d/lightdm ; cat /etc/pam.d/lightdm
#%PAM-1.0
auth     [success=done ignore=ignore default=bad] pam_selinux_permit.so
auth       required    pam_env.so
auth       substack    system-auth
-auth       optional    pam_gnome_keyring.so
-auth       optional    pam_mate_keyring.so
auth       include     postlogin
account    required    pam_nologin.so
account    include     system-auth
password   include     system-auth
session    required    pam_selinux.so close
session    required    pam_loginuid.so
session    optional    pam_console.so
-session    optional    pam_ck_connector.so
session    required    pam_selinux.so open
session    optional    pam_keyinit.so force revoke
session    required    pam_namespace.so
-session    optional    pam_gnome_keyring.so auto_start
-session    optional    pam_mate_keyring.so auto_start
session    include     system-auth
session    optional    pam_lastlog.so silent
session    include     postlogin

Comment 1 Fedora Update System 2013-10-06 02:50:55 UTC
lightdm-1.7.17-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/lightdm-1.7.17-2.fc20

Comment 2 Fedora Update System 2013-10-06 05:32:23 UTC
Package lightdm-1.7.17-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lightdm-1.7.17-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-18432/lightdm-1.7.17-2.fc20
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2013-10-08 21:04:46 UTC
lightdm-1.6.3-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/lightdm-1.6.3-2.fc19

Comment 4 Fedora Update System 2013-10-08 21:06:02 UTC
lightdm-1.4.5-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/lightdm-1.4.5-2.fc18

Comment 5 Fedora Update System 2013-10-09 14:23:16 UTC
Package lightdm-1.7.18-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lightdm-1.7.18-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-18432/lightdm-1.7.18-2.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-10-09 20:44:40 UTC
lightdm-1.8.0-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/lightdm-1.8.0-2.fc20

Comment 7 Fedora Update System 2013-10-12 04:26:02 UTC
lightdm-1.8.0-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2013-10-18 19:35:11 UTC
lightdm-1.6.3-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2013-10-18 19:39:57 UTC
lightdm-1.4.5-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.