If you change your keyboard layout after logging in, you may have issues entering a name and password when Mac OS X displays an authentication window—for example, when you try to make certain changes in locked System Preferences or install software.
Log out and back in after changing your keyboard layout to resolve the issue.
This happens because authentication windows use the keyboard layout that was active at login.