Index: source/helpers/basic_auth/PAM/basic_pam_auth.cc
===================================================================
--- source/helpers/basic_auth/PAM/basic_pam_auth.cc	(revision 204)
+++ source/helpers/basic_auth/PAM/basic_pam_auth.cc	(working copy)
@@ -166,6 +166,7 @@
     pam_handle_t *pamh = NULL;
     int retval = PAM_SUCCESS;
     char *user;
+    char *user_ptr;
     char *password_buf;
     char buf[HELPER_INPUT_BUFFER];
     time_t pamh_created = 0;
@@ -225,6 +226,14 @@
         rfc1738_unescape(password_buf);
         conv.appdata_ptr = (char *) password_buf;	/* from buf above. not allocated */
 
+        /* Remove DOMAIN\.. and ...@domain from the user name in case the user
+         * thought this was an NTLM authentication popup box
+         */
+        user_ptr = strchr(user, '@');
+        if (user_ptr) *user_ptr = 0;
+        user_ptr = strchr(user, '\\');
+        if (user_ptr) user = user_ptr + 1;
+
 #if _SQUID_SOLARIS_
         /* Workaround for Solaris 2.6 where the PAM library is broken
          * and does not pass appdata_ptr to the conversation routine

