password not accepted/wrong keyboard

Bug #428575 reported by Carolus
58
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Wubi
Fix Committed
Medium
Agostino Russo

Bug Description

Wubi installed and username/password defined. After restart password was not accepted. Escaped to terminal mode as root and changed password. Now I could enter wubi. Then in wubi I saw the keyboard layout was set to Italian. I changed this to US, International. Then authorization with password failed.
Cause of this trouble: I used a special character in my password, which was defined by the windows keyboard type: US International. After rebooting the keyboard layout was automatically changed to Italian and typing in my password resulted in an other special character and the password was not accepted. After redefining a new password the special character was that from the Italian keyboard. Then I changed the keyboard setting to USinternational and again the password was not accepted.
So either copy the keyboard layout setting from windows or ask it the user.

Related branches

Revision history for this message
Agostino Russo (ago) wrote :

Could you please attach the Wubi log? It is in the user temp folder under Windows.

Revision history for this message
Carolus (h-c-croon) wrote : Re: [Bug 428575] Re: password not accepted/wrong keyboard

Dear Agostino,

I do not know whether you ask me for the WUBI log file as a routine or after reading my bug
description. When you read my description and understand it, you will conclude that the log
file will not deliver any information concerning this bug.

- it is a WUBI bug, NOT a UBUNTU bug
- the solution is: do not automatically use the keyboard layout 'Italian', but copy the keyboard
layout from Windows.
- the keyboard layout determines to which keys the special characters as #, &, $, etc. are
assigned. So a change of the keyboard layout between installation and rebooting can also
change what has been typed in as a password. The username/password is defined during
installation under Windows so after rebooting the same keyboard layout must be configured
as during installation, when special characters are used in the username/password
combination.

I hope this is clear to you.

I am not unwilling to send you the WUBI log file, but I could not find it. Also it is not clear to
me whether it is a log file concerning the installation or concerning the reboot. What is the
exact filename and the exact path?

Kind regards,

Harry C. Croon

> Could you please attach the Wubi log? It is in the user temp folder
> under Windows.
>
> --
> password not accepted/wrong keyboard
> https://bugs.launchpad.net/bugs/428575
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Wubi, Windows Ubuntu Installer: New
>
> Bug description:
> Wubi installed and username/password defined. After restart password was not accepted. Escaped to terminal mode as root and changed password. Now I could enter wubi. Then in wubi I saw the keyboard layout was set to Italian. I changed this to US, International. Then authorization with password failed.
> Cause of this trouble: I used a special character in my password, which was defined by the windows keyboard type: US International. After rebooting the keyboard layout was automatically changed to Italian and typing in my password resulted in an other special character and the password was not accepted. After redefining a new password the special character was that from the Italian keyboard. Then I changed the keyboard setting to USinternational and again the password was not accepted.
> So either copy the keyboard layout setting from windows or ask it the user.
>

Revision history for this message
Agostino Russo (ago) wrote :

Wubi does copy the keyboard layout from Windows...
So I need to find out why it did not work in your case, and I need the Wubi log to do that.
The log is in your user temp folder, type '%temp%' in explorer and you should see it.

Revision history for this message
Carolus (h-c-croon) wrote :

OK, Agostino,

I found it with search for *.log and atteched it to this mail.

Regards,

Harry

> Wubi does copy the keyboard layout from Windows...
> So I need to find out why it did not work in your case, and I need the Wubi log to do that.
> The log is in your user temp folder, type '%temp%' in explorer and you should see it.
>
> --
> password not accepted/wrong keyboard
> https://bugs.launchpad.net/bugs/428575
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Wubi, Windows Ubuntu Installer: New
>
> Bug description:
> Wubi installed and username/password defined. After restart password was not accepted. Escaped to terminal mode as root and changed password. Now I could enter wubi. Then in wubi I saw the keyboard layout was set to Italian. I changed this to US, International. Then authorization with password failed.
> Cause of this trouble: I used a special character in my password, which was defined by the windows keyboard type: US International. After rebooting the keyboard layout was automatically changed to Italian and typing in my password resulted in an other special character and the password was not accepted. After redefining a new password the special character was that from the Italian keyboard. Then I changed the keyboard setting to USinternational and again the password was not accepted.
> So either copy the keyboard layout setting from windows or ask it the user.
>

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File: wubi-9.04-rev129.log
     Date: 11 Sep 2009, 11:05
     Size: 16786 bytes.
     Type: Unknown

Agostino Russo (ago)
Changed in wubi:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
CeesSluis (testcees) wrote :

Same problem in Karmic 9.10 test-version (see attachment) but able to solve it at the login screen. Clicked on the Italy keyboard and select other... USA solved it for me.

Revision history for this message
Carolus (h-c-croon) wrote :

Beste Cees,

Het is me niet geheel duidelijk hoe je de zaak oplost. Hoe kun je in het log-in scherm op
keyboard klikken?

Verder zie ik in de linked log file dat er hetzelfde gebeurt als bij mij. Ik krijg het idee dat het
overnemen uit windows van de keyboard layout net als bij mij mislukt en dat dan 'it' als
default waarde wordt genomen.

Hartelijke groet,

Harry Croon

> Same problem in Karmic 9.10 test-version (see attachment) but able to
> solve it at the login screen. Clicked on the Italy keyboard and select
> other... USA solved it for me.
>
> ** Attachment added: "wubi-9.10-rev158.log"
> http://launchpadlibrarian.net/33917371/wubi-9.10-rev158.log
>
> --
> password not accepted/wrong keyboard
> https://bugs.launchpad.net/bugs/428575
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Wubi, Windows Ubuntu Installer: Confirmed
>
> Bug description:
> Wubi installed and username/password defined. After restart password was not accepted. Escaped to terminal mode as root and changed password. Now I could enter wubi. Then in wubi I saw the keyboard layout was set to Italian. I changed this to US, International. Then authorization with password failed.
> Cause of this trouble: I used a special character in my password, which was defined by the windows keyboard type: US International. After rebooting the keyboard layout was automatically changed to Italian and typing in my password resulted in an other special character and the password was not accepted. After redefining a new password the special character was that from the Italian keyboard. Then I changed the keyboard setting to USinternational and again the password was not accepted.
> So either copy the keyboard layout setting from windows or ask it the user.
>

Revision history for this message
CeesSluis (testcees) wrote :

Dear Harry,

Notice that I use the Ubuntu 9.10 'Karmic Koala' beta test-version.

When I click on my name in the login-screen I see in the lower panel keyboard: Italian. I changed that to other: US international.

There are common things in our logfiles that might cause the selection of the wrong Italian keyboard:
 * DEBUG WindowsBackend: timezone=Europe/Rome (as Rome is in Italy)
 * DEBUG WindowsBackend: keyboard_id=-268368877 (HP ZX5000 laptop)
 * DEBUG WindowsBackend: keyboard_layout=it (but VS international is selected in Windows)

But I really don't know.

Revision history for this message
Carolus (h-c-croon) wrote :

Thxs a lot,

Groet van Harry

> Dear Harry,
>
> Notice that I use the Ubuntu 9.10 'Karmic Koala' beta test-version.
>
> When I click on my name in the login-screen I see in the lower panel
> keyboard: Italian. I changed that to other: US international.
>
> There are common things in our logfiles that might cause the selection of the wrong Italian keyboard:
> * DEBUG WindowsBackend: timezone=Europe/Rome (as Rome is in Italy)
> * DEBUG WindowsBackend: keyboard_id=-268368877 (HP ZX5000 laptop)
> * DEBUG WindowsBackend: keyboard_layout=it (but VS international is selected in Windows)
>
> But I really don't know.
>
> --
> password not accepted/wrong keyboard
> https://bugs.launchpad.net/bugs/428575
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Wubi, Windows Ubuntu Installer: Confirmed
>
> Bug description:
> Wubi installed and username/password defined. After restart password was not accepted. Escaped to terminal mode as root and changed password. Now I could enter wubi. Then in wubi I saw the keyboard layout was set to Italian. I changed this to US, International. Then authorization with password failed.
> Cause of this trouble: I used a special character in my password, which was defined by the windows keyboard type: US International. After rebooting the keyboard layout was automatically changed to Italian and typing in my password resulted in an other special character and the password was not accepted. After redefining a new password the special character was that from the Italian keyboard. Then I changed the keyboard setting to USinternational and again the password was not accepted.
> So either copy the keyboard layout setting from windows or ask it the user.
>

Revision history for this message
AJenbo (ajenbo) wrote :

Here is a snipit fro my log, as you might guess the real keyboard layout is dansih (da)

10-27 09:58 DEBUG WindowsBackend: previous_distro_name=Ubuntu
10-27 09:58 DEBUG WindowsBackend: keyboard_id=67503110
10-27 09:58 DEBUG WindowsBackend: keyboard_layout=it
10-27 09:58 DEBUG WindowsBackend: keyboard_variant=
10-27 09:58 DEBUG CommonBackend: python locale=('da_DK', 'cp1252')
10-27 09:58 DEBUG CommonBackend: locale=da_DK.UTF-8

10-12 23:33 DEBUG WindowsBackend: gmt=1
10-12 23:33 DEBUG WindowsBackend: country=IT
10-12 23:33 DEBUG WindowsBackend: timezone=Europe/Rome

I have attached the full log file

Revision history for this message
AJenbo (ajenbo) wrote :

Just to verify my setting, here is a screenshot of my windows settings showing, that i have a Danish keyboard layout, I'm located in Denmark, and my time zone is set to Copenhagen.
Some thing about how Wubi detects thees settings is WRONG.

Revision history for this message
AJenbo (ajenbo) wrote :

Heres the log from my girlsfinds HP laptop running xp

Revision history for this message
AJenbo (ajenbo) wrote :

And finaly from my laptop, this one also runnig XP

Revision history for this message
AJenbo (ajenbo) wrote :

Ps. My desktop is custome build using MS keyboard, the last laptop was a Dell.

Revision history for this message
Agostino Russo (ago) wrote :

Wubi tries to infer the country for registry settings if it fails, it uses the timezone to get somewhere close. This is why you end up in Rome...

I'd like to know if possible A your country, and B the registry values for

'HKEY_CURRENT_USER', 'Control Panel\\International', 'iCountry'
'HKEY_CURRENT_USER', 'Control Panel\\International', 'sCountry'

Revision history for this message
Carolus (h-c-croon) wrote :

Dear Agostino,

In my registry the values are:

iCountry 31
sCountry Nederland

So in sCountry the country is set in the local language! Probably you check it in English
(Netherlands)? That could be the reason for the bug?

Greetings,

Harry C. Croon

> Wubi tries to infer the country for registry settings if it fails, it
> uses the timezone to get somewhere close. This is why you end up in
> Rome...
>
> I'd like to know if possible A your country, and B the registry values
> for
>
> 'HKEY_CURRENT_USER', 'Control Panel\\International', 'iCountry'
> 'HKEY_CURRENT_USER', 'Control Panel\\International', 'sCountry'
>
> --
> password not accepted/wrong keyboard
> https://bugs.launchpad.net/bugs/428575
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Wubi, Windows Ubuntu Installer: Confirmed
>
> Bug description:
> Wubi installed and username/password defined. After restart password was not accepted. Escaped to terminal mode as root and changed password. Now I could enter wubi. Then in wubi I saw the keyboard layout was set to Italian. I changed this to US, International. Then authorization with password failed.
> Cause of this trouble: I used a special character in my password, which was defined by the windows keyboard type: US International. After rebooting the keyboard layout was automatically changed to Italian and typing in my password resulted in an other special character and the password was not accepted. After redefining a new password the special character was that from the Italian keyboard. Then I changed the keyboard setting to USinternational and again the password was not accepted.
> So either copy the keyboard layout setting from windows or ask it the user.
>

Revision history for this message
Agostino Russo (ago) wrote :

I see in the country mapping it is spelled "Netherlands", easy fix, I will update the stand-alone version on wubi-installer.org I cannot change the version on CD anymore

Agostino Russo (ago)
Changed in wubi:
status: Confirmed → Fix Committed
Revision history for this message
AJenbo (ajenbo) wrote :

I hope you localiced all the lang strings before you committed that fix.

My contry is Denmark

iCountry 45
sCountry Danmark

Also have you tested this on a English edition of Windows set to a different country? If I set my standard formats to Netherlands, sCountry = Holland (the Danish word for Netherlands), so now you just broke Wubi for any one with a version of windows that doesn't match the set number scheme and or keyboard layout.
Why the heck are you checking the sCountry instead of iCountry?

Not to mention, sCountry and iCountry has nothing to do with the keyboard layout, it indicates how numbers and dates should be formatted.

A girl i know uses a German laptop, it has a German keyboard layout, but she runs a English version of Windows with local settings set to Danish.
Here sCountry there for would be "Denmark". Before your fix her computer would be seen as having a Danish keyboard, with your fix it will probably end up as Italian, but none of them are correct!

I'm off to see if i can find a proper fix for this mess, in the mean time I suggest you withdraw your fix and make Wubi use iCountry instead of sCountry, it can be that hard to get the mapping from MSDN some where.

Revision history for this message
AJenbo (ajenbo) wrote :

I meant to say "it can't be that hard" obviously.

Any way under HKEY_CURRENT_USER', 'Keyboard Layout\Preload' there will be a numbered string for each installed keyboard layout.

I found a list of keyboard codes that windows uses, and what ISO they correspond to.

"00000402"="bg"
"00000404"="ch"
"00000405"="cz"
"00000406"="dk"
"00000407"="gr"
"00000408"="gk"
"00000409"="us"
"0000040A"="sp"
"0000040B"="su"
"0000040C"="fr"
"0000040E"="hu"
"0000040F"="is"
"00000410"="it"
"00000411"="jp"
"00000412"="ko"
"00000413"="nl"
"00000414"="no"
"00000415"="pl"
"00000416"="br"
"00000418"="ro"
"00000419"="ru"
"0000041A"="yu"
"0000041B"="sl"
"0000041C"="us"
"0000041D"="sv"
"0000041F"="tr"
"00000422"="us"
"00000423"="us"
"00000424"="yu"
"00000425"="et"
"00000426"="us"
"00000427"="us"
"00000804"="ch"
"00000807"="sg"
"00000809"="uk"
"0000080A"="la"
"0000080C"="be"
"00000813"="be"
"00000816"="po"
"00000C0C"="cf"
"00000C1A"="us"
"00001009"="us"
"0000100C"="sf"
"00001809"="us"
"00010402"="us"
"00010405"="cz"
"00010407"="gr"
"00010408"="gk"
"00010409"="dv"
"0001040A"="sp"
"0001040E"="hu"
"00010410"="it"
"00010415"="pl"
"00010419"="ru"
"0001041B"="sl"
"0001041F"="tr"
"00010426"="us"
"00010C0C"="cf"
"00010C1A"="us"
"00020408"="gk"
"00020409"="us"
"00030409"="usl"
"00040409"="usr"
"00050408"="gk"

It should be very easy to make Wubi use this to install the same keyboard layouts in Ubuntu.

I haven't found out how to see which of the installed keyboard layouts is currently selected. But i suggest that you as a minimum set the first none us (none 00000409) keyboard as the default. The reason for this is that I have seen many computers where the OEM installation leaves behind the US layout from the default MS install script, even though it's a laptop with only a Danish layout.
To prove my point her are some random Danish Windows desktop screenshot from Google, the DA in the lower right means that this computer has Danish keyboard layout selected and at least one more installed.
http://peter.mpbrun.dk/wp-content/uploads/office12/trial/10activated.png
http://www.kb.dk/export/sites/kb_dk/da/kub/campusbib/it/wireless_print/wireless_pics/vista1.jpg
http://www.pensionistedb.dk/grafik/PhotoFiltrevindue.jpg
http://www.it.life.ku.dk/vejledninger/traadloestnet/~/media/IT/wireless/eduroam_vista_dk/12.jpg.ashx
In fact 4/6 of the screenshots i found on Google had this, and as I have only ever known two guy who had multiple keyboards with different layouts, i seriously doubt that this reflects a deliberate setup of the user base.

Revision history for this message
AJenbo (ajenbo) wrote :

Good news, i just found out that the first (number 1) of the keyboard layouts represents the default one, so you can safely set this as the default in Ubuntu. How ever this still don't tell us the currently active layout, which I think would be even better to use.

Some words about this from MS: http://technet.microsoft.com/en-us/library/cc978687.aspx

This info should be valid for all NT versions of windows, but might be a little different on the dos based 9x/me, from what i have found instead of being string the layouts are sub keys, as I don't have a running 9x machine I can not currently verify this, but I will see if I can dig one up some time later today.

AJenbo (ajenbo)
Changed in wubi:
status: Fix Committed → Confirmed
Revision history for this message
AJenbo (ajenbo) wrote :

I have been toying around with the Wubi source code and at one point i had it detecting the correct keyboard layout, even befor using the fallback.

I think it is related to some issues with the something2something() functions, this is what i got when i put some more debug ouput in the log.

10-30 04:09 DEBUG WindowsBackend: icountry=45
10-30 04:09 DEBUG WindowsBackend: country=None

10-30 04:09 DEBUG WindowsBackend: win_keyboard_id=67503110
10-30 04:09 DEBUG WindowsBackend: locale_id=0x0406
10-30 04:09 DEBUG WindowsBackend: keyboard_layout=None

Revision history for this message
Carolus (h-c-croon) wrote :

Dear Agostino,

I think the followig remarks are important with respect to this bug:

- the bug does NOT depend on the country configuration but on the configuration of the
KEYBOARD TYPE. In the old ages of typewriters there exist Dutch keyboards. In the early
days of the PC IBM defined a Dutch keyboard too. But AFAIK for computers Dutch
keyboards are never selled. As a matter of fact computers in the Netherlands are selled with
keyboards of the type US INTERNATIONAL.

- there are 4 items which WIBU has to copy from Windows
1. the native Windows language. Most users in the Netherlands use the Dutch Windows
version, but a lot are using the English version.
2. The active language which has been chosen by the user for spell checking and keyboard
modification (p.e. diacrites which dead key usage). In fact each user can define more
language/keyboardtype combinations between which he can switch via an icon in the
systeem tray. One of these is the standard user language.
3. The residential country used for the actual timezone. An English speaking guy can live in
the Netherlands and always use English as his language, but must define his residential
country as the Netherlands.
4. the keyboard type. As said in the Netherlands this is normaly 'US International', but an
Italian guy in the Netherlands perhaps uses an Italian keyboard.

So the fix will be more complicated as changing the spelling of 'Netherlands' to 'Nederland'.

Greetings from

Harry Croon

> I see in the country mapping it is spelled "Netherlands", easy fix, I
> will update the stand-alone version on wubi-installer.org I cannot
> change the version on CD anymore
>
> --
> password not accepted/wrong keyboard
> https://bugs.launchpad.net/bugs/428575
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Wubi, Windows Ubuntu Installer: Confirmed
>
> Bug description:
> Wubi installed and username/password defined. After restart password was not accepted. Escaped to terminal mode as root and changed password. Now I could enter wubi. Then in wubi I saw the keyboard layout was set to Italian. I changed this to US, International. Then authorization with password failed.
> Cause of this trouble: I used a special character in my password, which was defined by the windows keyboard type: US International. After rebooting the keyboard layout was automatically changed to Italian and typing in my password resulted in an other special character and the password was not accepted. After redefining a new password the special character was that from the Italian keyboard. Then I changed the keyboard setting to USinternational and again the password was not accepted.
> So either copy the keyboard layout setting from windows or ask it the user.
>

Revision history for this message
Agostino Russo (ago) wrote :

Wubi checks all of the above, but there was a bug in that the mapping is integer->string and the look-up was passing a key as string instead of passing it as int, so the numeric lookup was failing. The first commit fixes that for the iCountry, I need another patch for the keymaps which will land shortly. The sCountry was used as a fallback, but because the iCountry lookup was failing, the fallback became the norm. The country is in turn used as a fallback for the case when the keyboard cannot be detected. Hence your observed behaviour. Will be fixed shortly and I will update the version available on wubi-installer.org and ubuntu.com later on.

Changed in wubi:
assignee: nobody → Agostino Russo (ago)
Revision history for this message
AJenbo (ajenbo) wrote :

Grate, but i Think you should remove the sContry part
, as it is a localized string, and instead rely on the languach the user selected in the first part of the instalation.

Revision history for this message
Carolus (h-c-croon) wrote :

Great!!!

Long for the new release.

Harry

> Wubi checks all of the above, but there was a bug in that the mapping is
> integer->string and the look-up was passing a key as string instead of
> passing it as int, so the numeric lookup was failing. The first commit
> fixes that for the iCountry, I need another patch for the keymaps which
> will land shortly. The sCountry was used as a fallback, but because the
> iCountry lookup was failing, the fallback became the norm. The country
> is in turn used as a fallback for the case when the keyboard cannot be
> detected. Hence your observed behaviour. Will be fixed shortly and I
> will update the version available on wubi-installer.org and ubuntu.com
> later on.
>
> ** Changed in: wubi
> Assignee: (unassigned) => Agostino Russo (ago)
>
> --
> password not accepted/wrong keyboard
> https://bugs.launchpad.net/bugs/428575
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Wubi, Windows Ubuntu Installer: Confirmed
>
> Bug description:
> Wubi installed and username/password defined. After restart password was not accepted. Escaped to terminal mode as root and changed password. Now I could enter wubi. Then in wubi I saw the keyboard layout was set to Italian. I changed this to US, International. Then authorization with password failed.
> Cause of this trouble: I used a special character in my password, which was defined by the windows keyboard type: US International. After rebooting the keyboard layout was automatically changed to Italian and typing in my password resulted in an other special character and the password was not accepted. After redefining a new password the special character was that from the Italian keyboard. Then I changed the keyboard setting to USinternational and again the password was not accepted.
> So either copy the keyboard layout setting from windows or ask it the user.
>

Revision history for this message
Agostino Russo (ago) wrote :
Agostino Russo (ago)
Changed in wubi:
status: Confirmed → Fix Committed
Revision history for this message
AJenbo (ajenbo) wrote :

Every thing seams ok:
11-04 11:02 DEBUG CommonBackend: language=da_DK
11-04 11:02 DEBUG CommonBackend: encoding=cp1252
11-04 11:02 DEBUG WindowsBackend: gmt=1
11-04 11:02 DEBUG WindowsBackend: country=DK
11-04 11:02 DEBUG WindowsBackend: timezone=Europe/Copenhagen
11-04 11:02 DEBUG WindowsBackend: windows_language_code=1030
11-04 11:02 DEBUG WindowsBackend: windows_language=Danish
11-04 11:02 DEBUG WindowsBackend: keyboard_id=67503110
11-04 11:02 DEBUG WindowsBackend: keyboard_layout=dk
11-04 11:02 DEBUG WindowsBackend: keyboard_variant=
11-04 11:02 DEBUG CommonBackend: python locale=('da_DK', 'cp1252')
11-04 11:02 DEBUG CommonBackend: locale=da_DK.UTF-8

Grate work :)

Revision history for this message
Agostino Russo (ago) wrote :
Revision history for this message
AJenbo (ajenbo) wrote :

same result, what did you change?

Revision history for this message
Agostino Russo (ago) wrote :

Other patches are in, checking there are no regressions.

Revision history for this message
CeesSluis (testcees) wrote :

Tested http://people.canonical.com/~evand/wubi/karmic/wubi-r168.exe

Default keyboard is now: USA International (with dead keys)

The right setting for my laptop! Thank you!

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

Other bug subscribers

Remote bug watches

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