This problem was first reported to Debian as http://bugs.debian.org/692730 . In Debian Edu, we have discovered a fatal problem with kdm, when used together with shutdown-at-night (See BTS #692539). The problem is that a client machine is automatically turned off at 16:00, even if a user is logged in, because 'who' do not report any logged in user when using kdm. This is turn is caused by kdm failing to update utmp when a user log in. To figure out what is going on, I tried to run strace on the "child" kdm process when I log in with a user, and this is the only section where utmp is touched: 12214 access("/var/run/utmpx", F_OK) = -1 ENOENT (No such file or directory) 12214 open("/var/run/utmp", O_RDONLY|O_CLOEXEC) = 6 12214 lseek(6, 0, SEEK_SET) = 0 12214 alarm(0) = 0 12214 rt_sigaction(SIGALRM, {0x7f0931fe1340, [], SA_RESTORER, 0x7f0931f0f230}, {0x416e80, [], +SA_RESTORER|SA_RESTART, 0x7f0931f0f230}, 8) = 0 12214 alarm(10) = 0 12214 fcntl(6, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0 12214 read(6, "\10\0\0\0\326\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "\2\0\0\0\0\0\0\0~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "\1\0\0\0002N\0\0~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "\10\0\0\0\315\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "\7\0\0\0\327/\0\0tty1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "\6\0\0\0\302\f\0\0tty5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "\6\0\0\0\301\f\0\0tty4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "\6\0\0\0\303\f\0\0tty6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "\6\0\0\0\300\f\0\0tty3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "\6\0\0\0\277\f\0\0tty2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "\7\0\0\0009%\0\0pts/0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "\10\0\0\0\0\0\0\0:0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384 12214 read(6, "", 384) = 0 12214 fcntl(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0 12214 alarm(0) = 10 12214 rt_sigaction(SIGALRM, {0x416e80, [], SA_RESTORER|SA_RESTART, 0x7f0931f0f230}, NULL, 8) = 0 12214 close(6) = 0 As you can see, there is no sigh of any write attempt. This is the current setup. root@tjener:~# grep -i sessreg /etc/kde4/kdm/kdmrc /etc/kde4/kdm/kdm.options /etc/kde4/kdm/kdmrc:#UseSessReg=true /etc/kde4/kdm/kdm.options:use-sessreg root@tjener:~# I found <URL: http://bugs.debian.org/303392 > talking about a problem with these options, and a the problem in the past where utmp was updated twice. I guess this problem is the flip side of that problem, where utmp isn't updated at all. Changing the setting to UseSessReg=true and no-use-sessreg solve the problem. Reproducible: Always Steps to Reproduce: 1. Log in using kdm 2. Run 'who' and observe that the logged in user is not listed there Expected Results: user listed by who, entry in utmp
> Changing the setting to UseSessReg=true and no-use-sessreg solve the problem. > Q.E.D.
This would only be said to solve the real problem is use-sessreg is obsolete or no longer implemented in kdm, which as far as I know is not the case. As far as I can tell, Debian is using the recommended setup for kdm to use its built-in support for updating utmp, and this built-in support do not work. If you know something more about the issue, please provide that information. Just closing the report without any sensible explanation is just rude.
little surprisingly, there is only *one* way to configure sessreg support in kdm: the one in kdmrc. everything else is downstream, and consequently not my problem.