GDM login asks only password on login failure

Gavin McCullagh gmccullagh at gmail.com
Tue Nov 6 14:28:43 GMT 2007


Hi,

On Tue, 06 Nov 2007, Bill Moseley wrote:
 
> Ah, no wonder I could not find any related configuration.  So, would
> it be much of a change to having both username and password fields on
> the screen at the same time.  It's helpful to see the username to know
> if you need to re-enter the username or just the password.

Again, Scott's the author, but I don't imagine it would be impossible.
Perhaps even prompting for "Password for <username>" would give enough info
to see the username was typed wrong.

> > In ldm2/ldm.c line 265 we add two lines so it looks like:
> > 
> >     cmd[i++] = "/usr/bin/ssh";
> >     cmd[i++] = "-o";    // added temporarily
> >     cmd[i++] = "NumberOfPasswordPrompts=1"; // added temporarily
> >     cmd[i++] = "-X";
> 
> Ok, I'm not at my server yet, but I can give this a try.   I assume
> ldm.c is used for the login we are discussing, but where's sshutuils.c
> used?  I there a second place where logins are asked?

LDM2 has a number of source files, including sshutils.c and ldm.c.  There
are two different places in the overall code which attempt to initiate an
ssh connection to the server (one in each file).  To be honest, I suggested
you change both, though you probably only need to change one of them.  It
wasn't clear to me which one was required and changing both will probably
be fine.

Basically, the code seems to run 
	ssh -X .... -l <username> <servername>

and uses "expect" to then feed the password through at the right moment.
By default, ssh clients always try to give the password 3 times before
failing.  So LDM does the same, it makes the above ssh connection, gets
prompted up to 3 times for the password (so it requests 3 times from the
user), then fails.

If you do 
	ssh -o NumberOfPasswordPrompts=1 -X .... -l <username> <servername>

it will fail after the first wrong password and you should get back to
being asked for the username.

As I say, I haven't tested this (except with a command line ssh), but I
think it should work.

> BTW -- where's the source repository?

The command "apt-get source <packagename>" uses apt to download the source
straight from the debian archive so you're getting the exact source code
that's used to build your existing binary package.  For customising a
single package, this is probably the way to go.

Gavin




More information about the edubuntu-users mailing list