autologin doesn't work

Bug #161794 reported by Francis Giraldeau
38
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Dapper by ferranb
Declined for Edgy by Martin Pitt
Nominated for Feisty by ferranb
Nominated for Gutsy by ferranb
Nominated for Hardy by ferranb

Bug Description

Autologin isn't working appropriately. This affect ltsp 5.0.39 in gutsy.

The symptom is that when enabling autologin, the resulting is a black screen, and login is never performed.

After a bit of inspection, it appears that get_host() function from client/ldm2/src/greeter_iface.c return nothing in the case of autologin. This happens, because get_host() assume that there is a greeter. This is not the case with autologin, because the greeter is not spawned.

I don't know what is best. I think that fuctions in greeter_iface should be called only in the case that there is a greeter spawned. Since the autologin doesn't, information should be retreived by using environment variables.

LDM_USERNAME and LDM_PASSWORD : trivial
LDM_SERVER : take the first in the list
If LDM_SERVER is not defined, fallback to use SERVER variable, that is always set no matter what.

Any comments are welcome.

Revision history for this message
fran cook (fmccook) wrote :

I am having the same result: blank screen with a 'X' (mouse cursor).

I preformed the following action to receive the above result:
Created and added the following lines to /var/lib/tftpboot/ltsp/i386/lts.conf
[00:0F:20:28:10:7D]
LDM_USERNAME=ws001
LDM_PASSWORD=password

Without the 3 lines in lts.conf the remote terminal boots to the standard login screen.

Revision history for this message
Oliver Grawert (ogra) wrote :

creating a proper user on the server and using the matching credentials used there for LDM_USERNAME/PASSWORD works fine here, i cant reproduce that, sorry ....
whats happening in /var/log/auth.log if you try to run a client with autologin ?

Changed in ltsp:
status: New → Incomplete
Revision history for this message
fran cook (fmccook) wrote :

I checked to ensure the username and password are valid. I commented out Mac address, LDM_USERNAME, and LDM_PASSWORD. The thin client was then presented with a login screen. I logged in using the same credentials in lts.conf.

I then returned lts.conf to the auto-login configuration.

Trying Auto-login again, I checked /var/log/auth.log. There were no entries in the auth.log. There were entries in daemon.log included below:

daemon.log
Nov 13 19:19:58 ltsp1 dhcpd: DHCPDISCOVER from 00:0f:20:28:75:8d via eth0
Nov 13 19:19:58 ltsp1 dhcpd: DHCPOFFER on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 13 19:20:02 ltsp1 dhcpd: DHCPREQUEST for 192.168.0.2 (192.168.0.254) from 00:0f:20:28:75:8d via eth0
Nov 13 19:20:02 ltsp1 dhcpd: DHCPACK on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 13 19:20:02 ltsp1 in.tftpd[25548]: tftp: client does not accept options
Nov 13 19:20:09 ltsp1 dhcpd: DHCPDISCOVER from 00:0f:20:28:75:8d via eth0
Nov 13 19:20:09 ltsp1 dhcpd: DHCPOFFER on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 13 19:20:09 ltsp1 dhcpd: DHCPREQUEST for 192.168.0.2 (192.168.0.254) from 00:0f:20:28:75:8d via eth0
Nov 13 19:20:09 ltsp1 dhcpd: DHCPACK on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 13 19:20:10 ltsp1 dhcpd: DHCPREQUEST for 192.168.0.2 (192.168.0.254) from 00:0f:20:28:75:8d via eth0
Nov 13 19:20:10 ltsp1 dhcpd: DHCPACK on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 13 19:20:10 ltsp1 nbdrootd[25562]: connect from 192.168.0.2 (192.168.0.2)
Nov 13 19:20:10 ltsp1 nbd_server[25563]: connect from 192.168.0.2, assigned file is /opt/ltsp/images/i386.img
Nov 13 19:20:10 ltsp1 nbd_server[25563]: Size of exported file/device is 146518016
Nov 13 19:20:17 ltsp1 ldminfod[25565]: connect from 192.168.0.2 (192.168.0.2)

... The thin client remains hung up at this point. The thin client screen is black, with a 'X' (mouse cursor). The mouse cursor is response to movement of the mouse on the thin client.

Anything else I should I do?

Revision history for this message
Oliver Grawert (ogra) wrote :

hmm, you should at least see the username in auth.log with either successfull or failed login, the daemon.log entries are totally fine but dont refer to the login process at all.
what happens if you enable LDM_USERNAME and LDM_PASSWORD and if you set LDM_SERVER=192.168.0.254 ?

Revision history for this message
fran cook (fmccook) wrote :
Download full text (4.4 KiB)

I edited lts.conf and booted the thin client. The results were the same -- black screen with 'x' mouse cursor. I also edited lts.conf and replaces a valid username (ws001) with an invalid username (dummy). The thin client hangs on the black screen with the 'x' mouse cursor.

I also added another user to the server and changed lts.conf to reflect the new user and login. Same results...

Here are the results of all logs that had entries for the thin client boot process:

lts.conf:
[00:0f:20:28:75:8d]
 LDM_USERNAME=ws001
 LDM_PASSWORD=password
 LDM_SERVER=192.168.0.254

syslog:
Nov 15 04:19:16 ltsp1 kernel: [ 184.599916] eth0: setting full-duplex.
Nov 15 04:19:16 ltsp1 kernel: [ 184.600133] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Nov 15 04:19:17 ltsp1 avahi-daemon[5044]: Registering new address record for fe80::210:5aff:fe1b:c373 on eth0.*.
Nov 15 04:19:26 ltsp1 kernel: [ 194.635666] eth0: no IPv6 routers present
Nov 15 04:19:29 ltsp1 dhcpd: DHCPDISCOVER from 00:0f:20:28:75:8d via eth0
Nov 15 04:19:29 ltsp1 dhcpd: DHCPOFFER on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 15 04:19:37 ltsp1 dhcpd: DHCPREQUEST for 192.168.0.2 (192.168.0.254) from 00:0f:20:28:75:8d via eth0
Nov 15 04:19:37 ltsp1 dhcpd: DHCPACK on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 15 04:19:37 ltsp1 in.tftpd[5772]: tftp: client does not accept options
Nov 15 04:19:44 ltsp1 dhcpd: DHCPDISCOVER from 00:0f:20:28:75:8d via eth0
Nov 15 04:19:44 ltsp1 dhcpd: DHCPOFFER on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 15 04:19:44 ltsp1 dhcpd: DHCPREQUEST for 192.168.0.2 (192.168.0.254) from 00:0f:20:28:75:8d via eth0
Nov 15 04:19:44 ltsp1 dhcpd: DHCPACK on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 15 04:19:45 ltsp1 dhcpd: DHCPREQUEST for 192.168.0.2 (192.168.0.254) from 00:0f:20:28:75:8d via eth0
Nov 15 04:19:45 ltsp1 dhcpd: DHCPACK on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 15 04:19:45 ltsp1 nbdrootd[5788]: connect from 192.168.0.2 (192.168.0.2)
Nov 15 04:19:45 ltsp1 nbd_server[5789]: connect from 192.168.0.2, assigned file is /opt/ltsp/images/i386.img
Nov 15 04:19:45 ltsp1 nbd_server[5789]: Size of exported file/device is 146518016
Nov 15 04:19:52 ltsp1 ldminfod[5791]: connect from 192.168.0.2 (192.168.0.2)

auth.log
Nov 15 04:16:56 ltsp1 sshd[4658]: Server listening on :: port 22.
Nov 15 04:16:56 ltsp1 sshd[4658]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Nov 15 04:17:02 ltsp1 gdm[5133]: pam_unix(gdm-autologin:session): session opened for user fm by (uid=0)

daemon.log
Nov 15 04:19:17 ltsp1 avahi-daemon[5044]: Registering new address record for fe80::210:5aff:fe1b:c373 on eth0.*.
Nov 15 04:19:29 ltsp1 dhcpd: DHCPDISCOVER from 00:0f:20:28:75:8d via eth0
Nov 15 04:19:29 ltsp1 dhcpd: DHCPOFFER on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 15 04:19:37 ltsp1 dhcpd: DHCPREQUEST for 192.168.0.2 (192.168.0.254) from 00:0f:20:28:75:8d via eth0
Nov 15 04:19:37 ltsp1 dhcpd: DHCPACK on 192.168.0.2 to 00:0f:20:28:75:8d via eth0
Nov 15 04:19:37 ltsp1 in.tftpd[5772]: tftp: client does not accept options
Nov 15 04:19:44 ltsp1 dhcpd: DHCPDISCOVER from 00:0f:20:28:75:8d via eth0
Nov 15 04:19:44 ltsp1 dhcpd: DHCPOFFER on 192.168.0.2 to...

Read more...

Revision history for this message
Steve Jackson (aearenda) wrote :

This is happening for me too, exactly as described by Fran Cook. When the terminal stops, the mouse moves but CTRL/ALT/F1 does not work, so I cannot discover what the terminal is doing.

Revision history for this message
fran cook (fmccook) wrote :

I installed edubuntu server and still have auto-login fail.

To reproduce the auto-login failure, do the following:

The hardware is a x86 machine with 2 ethernet adapters
1. Install edubuntu-server 7.10
-a choose Eth1 as the default interface.
-b Eth0 is automatically selected as the ltsp interface.
2. Create user - "ws001" with password "testpass"
3. Create the following file:

/var/lib/tftpboot/ltsp/i386/lts.conf

-----Start of text lts.conf ------------
[default]
 LDM_SERVER=192.168.0.254

[00:0f:20:28:75:8d]
 LDM_USERNAME=ws001
 LDM_PASSWORD=testpass

-----End of text lts.conf ------------

Connect a thin client to the network the LDM Server is using (Eth0).

The thin client with the above mac address hangs on a black screen with a 'x' mouse cursor.

Revision history for this message
Oliver Grawert (ogra) wrote :
Revision history for this message
nonsparker (ajcook) wrote :

I tried the fix that Oliver linked to but that did not work. Still the same black screen with 'x' Mouse

Revision history for this message
Oliver Grawert (ogra) wrote :

well, i assume its only part of the breakage, but according to the fix autologin cant work since LDM_SERVER is never set, this variable is needed internally (have a look at ldm.c). without it the client tries to simply connect to nirvana.

Revision history for this message
J ME J (jamie-cyberdeployment) wrote :

Hi all, I have tried auto login and just get a blank screen to. I hope this bug it fixed soon. Its a real Pain.

Revision history for this message
nonsparker (ajcook) wrote :

It is a pain for me as well. I'm trying to get my Boss to let me use more open solutions and then this comes along. We are now going back to windows for the project. Another one bites the dust!

Revision history for this message
Francis Giraldeau (francis-giraldeau) wrote :

I did other inspection, and I found that ldm is waiting on the stdin for hostname :

On the client, ps fax :

 3439 ? S 0:00 /bin/sh /usr/lib/ltsp/screen.d/ldm
 3467 ? S 0:00 \_ ldm vt7 :6

Now, strace :

root@ltsp:~# strace -p 3467
Process 3467 attached - interrupt to quit
read(0,

So, I will provide a patch to change the behavior of get_host in the case of autologin, which must not ask the greeter for server.

Revision history for this message
Francis Giraldeau (francis-giraldeau) wrote :

Patch attached.

I did removed reference to autologin in the greeter_iface.c and moved everything in ldm.c, with clear error message.

When some info is missing, I still get a flashing blank screen. We should provide feedback to the user about the error, and maybe fallback to greeter if there are missing autologin information.

I did uploaded a package in my PPA. To manage the patch, I added dpatch to rules, and I could make sens to add it in the main package.

Revision history for this message
Francis Giraldeau (francis-giraldeau) wrote :

The previous patch have a mistake. There is a regression with the standard login. Please use the new patch attached.

Revision history for this message
Steve Jackson (aearenda) wrote :

I have tested the patch using a .deb Francis sent me (presumably the second patch) and it now works as advertised, both when logging in normally and when logging in automatically. Thankyou Francis!

Revision history for this message
bazz (tcpip247) wrote :

Silly question....How do I apply the patch??

Revision history for this message
Oliver Grawert (ogra) wrote :

you need to apply it to the ltsp source package.
install the packaging-guide (will show up in the system help after installation) to see how to build a patched package.
then install the created ldm binary package in the chroot and run ltsp-update-image.

Revision history for this message
bazz (tcpip247) wrote :

So I need to find the source package then.... how do I find that? I also need to install an environment? I may just have to wait for the deb.
So to build a package.....is it as involved as it looks?
Sorry just clue less at this point.

Revision history for this message
Oliver Grawert (ogra) wrote :

sorry, apparently the packaging guide doesnt register in the help viewer anymore, run:
firefox file:///usr/share/packaging-guide/html/C/index.html
to get to it ...

apt-get source ltsp will get you teh ltsp source packages

Revision history for this message
bazz (tcpip247) wrote :

I did that much already, just dont know where to go from there. I read most of the guide, but this is my first time and dont know what part I should be looking at. I installed all the tools, have your patch, and just trying to see where to go from there.

Revision history for this message
bazz (tcpip247) wrote : Re: [Bug 161794] Re: autologin doesn't work

I'm trying to use chapter 6 to do this. All that tells
me is how to make a patch, not apply it.
So how do I actually apply the patch. Do I need to
created the patch directory in the
source(debian/patch)? Where and what is the 00list?
Sorry just cant find anything out there to help me.

--- Oliver Grawert <email address hidden>
wrote:

> sorry, apparently the packaging guide doesnt
> register in the help viewer anymore, run:
> firefox
> file:///usr/share/packaging-guide/html/C/index.html
> to get to it ...
>
> apt-get source ltsp will get you teh ltsp source
> packages
>
> --
> autologin doesn't work
> https://bugs.launchpad.net/bugs/161794
> You received this bug notification because you are a
> direct subscriber
> of a duplicate bug.
>

      ____________________________________________________________________________________
Be a better sports nut! Let your teams follow you
with Yahoo Mobile. Try it now. http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ

Revision history for this message
bazz (tcpip247) wrote :

I received the patch as well and it does work.

Revision history for this message
nonsparker (ajcook) wrote :

Ok I'm going to apply the patch. I am in the same boat as Bazz. Did you get sent a .deb package? or am I going to have to struggle through Ch 6 of the packaging guide?

Revision history for this message
Bruno (bruno-vernier) wrote :

FYI, Francis keeps his deb files here: (including the patched ltsp deb with autologin ldm)

https://launchpad.net/~francis-giraldeau/+archive

Revision history for this message
Anthony M Simonelli (asimonelli) wrote :

I've installed the following packages:

On the Server:
ltsp-server_5.0.39ubuntu1~fg4_all.deb

In the Chroot:
ldm_5.0.39ubuntu1~fg4_i386.deb
ltsp-client_5.0.39ubuntu1~fg4_all.deb
ltsp-client-core_5.0.39ubuntu1~fg4_i386.deb

I've updated the image and auto-login still doesn't work. Do I need to rebuild the chroot from scratch rather than update?

Revision history for this message
Francis Giraldeau (francis-giraldeau) wrote :

The bug is in the ldm package, that must be installed inside the chroot.

mv ldm_5.0.39ubuntu1~fg4_i386.deb /opt/ltsp/i386/
chroot /opt/ltsp/i386/
dpkg -i /ldm_5.0.39ubuntu1~fg4_i386.deb

If then it doesn't work for you, can you supply the configuration inside the lts.conf?

Cheer

Revision history for this message
Andy S (ubuntu-thesargents) wrote :

During the dpkg command, it is complaining about the version of libpango not being 1.8.3 (says it is currently 1.8.2). How do I upgrade it?

Thanks.

Revision history for this message
Jarek Stemplewski (jstemplewski) wrote :

First do:
sudo cp /etc/apt/sources/list /opt/ltsp/i386/etc/apt/sources.list

Next chroot into /opt/ltsp/i386, mount /proc and run aptitude

In aptitude do the update, then hold (=) linux-image-2.6.22-14-386 in 'security updates' section (gives an error during upgrade so far.)

Then upgrade packages, quit aptitude and install new ldm.

One disadvantage I observed is that I loose my floppies on thin clients after that, usb sticks work perfectly.

Cheers

Revision history for this message
Scott Harmon (harmon) wrote :

This is still an issue. Is there a plan to incorporate Francis Giraldeau's fix into mainline?

Revision history for this message
ferranb (ferranb) wrote :

There are any upgrade on ltsp that solves this issue?

Revision history for this message
Brunni (michaelbrunner) wrote :

I used the patched ldm from francis and it worked.
(I did it along to this german Tutorial http://forum.ubuntuusers.de/topic/137352/)

But when autologin is activated, there is no way that a user could log out and log into his own account.

I would like to have a button at the greeter where you can click to login using the auto-login-user,
because then it is possible for user who have their own account to log in with this.

(Or perhaps some timeout before auto-login?)

Is it difficult to implement this button?

Revision history for this message
Francis Giraldeau (francis-giraldeau) wrote :

This wouldn't be that much hard to implement, but needs to be discussed.

Please open a new bug, and make sure that you the bug is flaged as Whishlist.

Francis

Revision history for this message
dcharles8 (de-bollivier-charles) wrote :

hello,

I install the patch ldm_5.0.39ubuntu1~fg4_i386.deb and i'm have this message error :

dpkg - avertissement : ldm mis à jour de la version 5.0.40~bzr20080212-0ubuntu4 vers l'ancienne version 5.0.39ubuntu1~fg4.
(Lecture de la base de données... 17277 fichiers et répertoires déjà installés.)
Préparation du remplacement de ldm 5.0.40~bzr20080212-0ubuntu4 (en utilisant ldm_5.0.39ubuntu1~fg4_i386.deb) ...
Dépaquetage de la mise à jour de ldm ...
dpkg : erreur de traitement de ldm_5.0.39ubuntu1~fg4_i386.deb (--install) :
 tentative de remplacement de « /usr/share/ldm/rc.d/S05-set-ltspfs_token », qui appartient aussi au paquet ltspfsd
Des erreurs ont été rencontrées pendant l'exécution :
 ldm_5.0.39ubuntu1~fg4_i386.deb

please help me

Server = ubuntu 8.04 alternate cd

Revision history for this message
Oliver Grawert (ogra) wrote :

the 5.0.40 packages all have the autologin feature, please use the packages from the archive and use the LDM_USERNAME, LDM_PASSWORD and LDM_AUTOLOGIN variables in your lts.conf file ....

Revision history for this message
Oliver Grawert (ogra) wrote :

ldm (5.0.40~bzr20080212-0ubuntu1) hardy; urgency=low

  * new upstream
....
   * add boolean environment variable LDM_AUTOLOGIN to enable autologin support.
     (LP: #161794)
....

not sure why the autoclosing mechanism of launchpad didnt pick that up ....

Changed in ltsp:
status: Incomplete → Fix Released
Revision history for this message
dcharles8 (de-bollivier-charles) wrote :

hello,

it's ok now, the autologin it's ok.

Thank you

Revision history for this message
seshomaru samma (itai1m) wrote :

Hi,
I'm using Intrepid and experiencing the exact same symptoms in auto logins: the x cursor hangs on for hours

I'm not sure which patch to apply and how , I've looked here : https://launchpad.net/~francis-giraldeau/+archive/ppa but still not sure...

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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