17.04.2010

No asterisks for passwords in gdm login window!

The GNOME Display Manager was extensively customisable - until it got rewritten. Now it's a pain the arse to change anything about the login mask. There are 2 things that I wanted to change and I finally managed to do so.
  1. Disable the user album. One disadvantage of this is that everyone can see which users exist on the computer - this might be a security concern. Another issue is that it's impossible to log in as root.
    As this setting is saved in the gconf-tree, You need to edit that. The graphical gconf-editor didn't work for me, but using the command line is faster anyway (if you know what to enter, of course):
    Code:
    $ sudo -u gdm gconftool -t bool -s /apps/gdm/simple-greeter/disable_user_list true
    If You're asked for gdm's password, try executing the command as root (still with sudo -u gdm, of course).
  2. The other issue is related to the password entry in the gdm login window. When entering the password, a black circle is displayed for every letter. This makes it possible for everyone looking to observe Your password length. To change it, You need to edit the .ui file of the simple-greeter application. Its location is:
    Code:
    /usr/share/gdm/gdm-greeter-login-window.ui
    Search for the line
    Code:
    <object class="GtkEntry" id="auth-prompt-entry">
    This seems to be some GTK data describing the user/password entry field in the login window. Following that line there's a list of <property> entries. At the end of the list, insert the following line:
    Code:
    <property name="invisible_char">&#x200B;</property>
    This sets the character which is displayed instead of the typed letters to the unicode letter 200B, which is the zero-width space character, effectively hiding anything You type into the password field. You can also set the character to anything else you like - at least any unicode letter. Using non-existant letters like 0000, however, will break Your gdm, as the gdm-greeter-login-window will fail and will not be displayed, disabling the ability to log in via gdm.
That's it! You're done!

Keine Kommentare:

Kommentar veröffentlichen