Index: gui/gdmlogin.c
===================================================================
--- gui/gdmlogin.c	(revision 5348)
+++ gui/gdmlogin.c	(working copy)
@@ -2092,12 +2092,24 @@
 key_release_event (GtkWidget *entry, GdkEventKey *event, gpointer data)
 {
 	const char *login_string;
+	login_string = gtk_entry_get_text (GTK_ENTRY (entry));
 
 	/*
+	 * Allow tab to trigger enter if there are characters in the entry
+	 * field
+	 */
+	if ((event->keyval == GDK_Tab ||
+	     event->keyval == GDK_KP_Tab) &&
+	    (event->state & (GDK_CONTROL_MASK|GDK_MOD1_MASK|GDK_SHIFT_MASK)) == 0 &&
+	    login_string && login_string[0] != '\0') {
+		gdm_login_enter (entry);
+		return TRUE;
+	}
+
+	/*
 	 * Set ok button to sensitive only if there are characters in
 	 * the entry field
 	 */
-	login_string = gtk_entry_get_text (GTK_ENTRY (entry));
         if (login_string != NULL && login_string[0] != '\0')
 		gtk_widget_set_sensitive (ok_button, TRUE);
 	else
Index: gui/greeter/greeter_item_pam.c
===================================================================
--- gui/greeter/greeter_item_pam.c	(revision 5348)
+++ gui/greeter/greeter_item_pam.c	(working copy)
@@ -181,15 +181,29 @@
       GTK_IS_ENTRY (GNOME_CANVAS_WIDGET (entry_info->item)->widget))
     {
        const char *login_string;
-       GtkWidget *entry = GNOME_CANVAS_WIDGET (entry_info->item)->widget;
+	GtkWidget *entry = GNOME_CANVAS_WIDGET (entry_info->item)->widget;
 
+       login_string = gtk_entry_get_text (GTK_ENTRY (entry));
+
+       /*
+        * Allow tab to trigger enter if there are characters in the entry
+        * field
+        */
+       if ((event->keyval == GDK_Tab ||
+            event->keyval == GDK_KP_Tab) &&
+           (event->state & (GDK_CONTROL_MASK|GDK_MOD1_MASK|GDK_SHIFT_MASK)) == 0 &&
+           login_string && login_string[0] != '\0')
+          {
+		greeter_item_pam_login (GTK_ENTRY (entry), entry_info);
+		return TRUE;
+           }
+
        if (gtk_ok_button != NULL)
           {
              /*
               * Set ok button to sensitive only if there are characters in
               * the entry field
               */
-             login_string = gtk_entry_get_text (GTK_ENTRY (entry));
              if (login_string != NULL && login_string[0] != '\0')
 		     gtk_widget_set_sensitive (GTK_WIDGET (gtk_ok_button), TRUE);
              else
