LightDM does not update btmp, wtmp and, or utmp records

Reported by Balwinder S Dheeman on 2011-10-09
78
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Light Display Manager
Medium
Unassigned
Ubuntu
Undecided
Unassigned
lightdm (Debian)
Confirmed
Unknown

Bug Description

On a Unix-like and, or on a multi-user environment any login alternative must update utmp (http://en.wikipedia.org/wiki/Utmp) records for each and every user's login state.

Due this shortcoming or missing feature of LightDM many utilities like 'w', 'who', 'last' and 'write' fail to work.

Balwinder S Dheeman (bdheeman) wrote :

I think, some PAM module can do that, but I'm sure and, or don't know how. Need to check
http://anonscm.debian.org/viewvc/pkg-shadow/upstream/trunk/src/login.c?revision=3438&view=markup

Changed in lightdm:
importance: Undecided → Medium
Robert Ancell (robert-ancell) wrote :

What distribution are you using? I just tried logging in with LightDM and KDM and the output of 'w' is the same in both (in Ubuntu).

Balwinder S Dheeman (bdheeman) wrote :

I debbuild and installed it on Debian wheezy/testing both i386 and amd64 machines:

consolekit = 0.4.5-1
dbus = 1.4.16-1
libglib2.0-0 = 2.28.6-1
libpam0g = 1.1.3-4
xserver-xorg = 1:7.6+9

using default lightdm-gtk-greeter, attempted to use lightdm-qt-greeter also, but to a no avail.

Mike Perrin (mperrin) wrote :

I observed this bug on a fresh install of Ubuntu 11.10 using LightDM. Terminal logins are reported by who but the console GUI login is not. Changing the display manager to gdm solves the problem. Here are the responses obtained executing the who command with a single terminal window open.

Using GDM:
mike tty7 2011-10-16 14:21 (:0)
mike pts/0 2011-10-16 14:22 (:0.0)

Using LightDM:
mike pts/0 2011-10-16 14:38 (:0.0)

This bug prevents me from using LightDM because I run a background process that monitors user logins/logouts and mounts/unmounts CIFS shares on those events. With LightDM, the console GUI login is never seen.

Richard Wallace (rwallace) wrote :

I'm experiencing the same problem. This is causing the /etc/apci/lid.sh script to not be able to find the logged in users .Xauthority and cannot put the laptop to sleep when the lid is closed.

Balwinder S Dheeman (bdheeman) wrote :

After reading PAM documentation, I rewrote pam conf for lightdm on Debian as follows:

[bsd@mon ~]$ cat /etc/pam.d/lightdm
auth required pam_env.so
auth required pam_env.so envfile=/etc/default/locale
@include common-auth
auth optional pam_gnome_keyring.so
account required pam_nologin.so
@include common-account
@include common-session
session required pam_limits.so
@include common-password

[bsd@mon ~]$ cat /etc/pam.d/lightdm-autologin
auth required pam_env.so
auth required pam_env.so envfile=/etc/default/locale
auth sufficient pam_succeed_if.so user ingroup nopasswdlogin
@include common-auth
auth optional pam_gnome_keyring.so
account required pam_nologin.so
@include common-account
@include common-session
session optional pam_gnome_keyring.so auto_start
session required pam_limits.so
@include common-password

But, I could not figure out what's wrong with the above setup, debian's pam or lightdm; the similar conf copied from ubuntu's current lightdm did not work either.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Sebastien Bacher (seb128) wrote :

seems similar to bug #870297, could you see if the new version fixes it for you?

Mike Perrin (mperrin) wrote :

The problem is still there with version 1.0.6. Repeating my test with one terminal window open:

mike@stealthwork:~$ /usr/sbin/lightdm --version
lightdm 1.0.6
mike@stealthwork:~$ who
mike pts/0 2011-11-10 14:38 (:0.0)
mike@stealthwork:~$

Changed in lightdm (Debian):
status: Unknown → Confirmed
Yves-Alexis Perez (corsac) wrote :

Note that in this case it might be wise to separate with and without accountservices, in case this service does some related job.

Forest (foresto) wrote :

This may be the underlying cause of bug #896663.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.