--- gnome-about-me-password.c.orig      2011-11-23 19:51:05.614368174 +0000                                                                               
+++ gnome-about-me-password.c   2011-11-23 21:45:30.129885168 +0000
@@ -498,7 +498,8 @@
                        break;
                case PASSWD_STATE_RETYPE:
                        /* Passwd is asking for our retyped new password */
-
+
+                       /* try to match the output with either sucess or a specific error condition */
                        if (is_string_complete (str->str, "successfully",
                                                          "short",
                                                          "longer",
@@ -513,7 +514,8 @@
                                                          "match",
                                                          "1 numeric or special",
                                                          "failure",
-                                                         NULL)) {
+                                                         NULL))
+                       {

                                /* What response did we get? */
                                passdlg_set_busy (pdialog, FALSE);
@@ -573,6 +575,25 @@
                                }

                                /* child_watch_cb should clean up for us now */
+
+                       }       /* is_string_complete */
+                       else    /* the output message did not match anything we know of - let's handle the error as possible */
+                       {
+                               int diff, maxchars;
+                               /* we must stop at a \n since Active Directory sends lists of lines separated by \n - we only want the first one */
+                               char *endptr = strchr(str->str,'\n');
+
+                               /* but in other cases if str->str is not correctly null terminated endptr could be wrong... */
+                               diff = endptr - str->str + 1;
+                               maxchars = diff > str->len ? str -> len : diff;
+
+                               passdlg_set_busy (pdialog, FALSE);
+                               msg = g_strndup (_(str->str), maxchars);
+
+                               passdlg_set_status (pdialog, msg);
+                               pdialog->backend_state = PASSWD_STATE_ERR;
+
+                               g_free (msg);
                        }
                        break;
                case PASSWD_STATE_NONE: