[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#692539: debian-edu-config: Diskless workstations with XFCE do not register logged in users in utmp



Sending this thread back to BTS, to make sure the knowledge is
recorded.

[Wolfgang Schweer]
> According to man kdm.options the option »use-sessreg« should enable
> writing to utmp. That option is set by default in
> /etc/kde4/kdm/kdm.options but doesn't seem to work by some reason.
> Setting the same (?) option in kdmrc does work.

Right.  I found <URL: http://bugs.debian.org/303392 > talking about
problems with these options.  The opposite problem in fact, getting
two utmp entries when only one should be included.

> For testing I used a pxeinstalled LTSP-Server (LXDE, gdm) with kdm
> and kdepasswd installed additionally in the chroot. Your proposed
> patch didn't work for diskless workstations. In order to find out if
> kdm would need other writable dirs I installed both packages on the
> server and found that utmp wasn't updated there, too, if kdm was
> used instead of gdm. So I figured all machines would show the same
> failure. Maybe things are different if there's a complete KDE
> desktop installation?

You are right.  I was fooled by konsole adding utmp entries on its
own.  There is no utmp entry for my login on my laptop, only for the
konsole shells I use.  So the problem seem to be a generic kdm issue.

I had a look at the strace for kdm when logging in, and it is trying
to access utmp, but do not write anything to it:

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

Thus the correct workaround for now in Squeeze seem to be to edit
/etc/kde4/kdm/kdm.options to comment out use-sessreg (just for
clarity), and edit /etc/kde4/kdm/kdmrc to set UseSessReg=true to get
utmp updating actually working.  We could use cfengine for this to fix
new installations.  Not quite sure how we should fix existing
installations.  Anyone know if this problem is also there in Wheezy?

-- 
Happy hacking
Petter Reinholdtsen


Reply to: