Gnus development mailing list
 help / color / mirror / Atom feed
* Authentication?
@ 1997-08-17 18:22 Kevin Cheek
  1997-08-17 19:47 ` Authentication? Jason R Mastaler
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Cheek @ 1997-08-17 18:22 UTC (permalink / raw)



Is authentication working for anyone? Whenever I try to access an nntp
server that requires authentication, gnus hangs immediately after I
enter the password. I searched the mailing list archives and foudn
that other people have reported the same problem, but it didn't look
like anyone had found a solution yet. Some people said that hitting
C-g would let them read news, but when I try that, gnus just quits.

I have (setq nntp-authinfo-function (function
nntp-send-nosy-authinfo)) in my .gnus since the user names required by
the nntp servers are not my local user name. I access two other nntp
servers that do not require authentication without any problems. One
of the two servers that require authentication allows me to
temporarily allow unauthenticated nntp access from a specific IP
address by accessing a web page first. When I do that, gnus can access
that server without any problems. Therefore, the problem seems to be
only with the authentication code in gnus.

I have tried 5.4.64 and 5.4.65 with XEmacs 19.15. I also tried
clearing out my .gnus and temporarily removing my .newsrc.eld. Then, I
tried using GNU Emacs 19.34. Nothing seemed to make any difference.

Does anyone have any suggestions?

-- 
 Kevin Cheek <kcheek@umich.edu>
 University of Michigan, Department of Internal Medicine
 Divisions of Rheumatology and Molecular Medicine & Genetics
 "Faith: not *wanting* to know what is true." -- Friedrich Nietzsche


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Authentication?
  1997-08-17 18:22 Authentication? Kevin Cheek
@ 1997-08-17 19:47 ` Jason R Mastaler
  1997-08-18 19:47   ` Authentication? Kevin Cheek
  0 siblings, 1 reply; 5+ messages in thread
From: Jason R Mastaler @ 1997-08-17 19:47 UTC (permalink / raw)


I have the same situation here.  I added this function (Darrell
Fuhriman's) to my .gnus and it's working fine.  Make sure to replace
"relay" with the hostname of your nntp server.
 
------
 
(add-hook 'nntp-server-opened-hook
          (lambda ()
            (cond ((string-match "relay" nntp-address)
                   (nntp-send-nosy-authinfo-from-file))
                  (t
                    ))))
 
(defun nntp-send-nosy-authinfo-from-file ()
  "Send the AUTHINFO to the nntp server, including username and password
  This function is supposed to be called from `nntp-server-opened-hook'."
  (when (file-exists-p "~/.nntp-authinfo")
    (nnheader-temp-write nil
      (insert-file-contents "~/.nntp-authinfo")
      (goto-char (point-min))
      (nntp-send-command
       "^.*\r?\n" "AUTHINFO USER"
       (buffer-substring (point) (progn (end-of-line) (point))))
      (goto-line 2)
      (nntp-send-command 
       "^.*\r?\n" "AUTHINFO PASS" 
       (buffer-substring (point) (progn (end-of-line) (point)))))))
 
------
 
Also create a file called ".nntp-auth info" and put the username on
the first line and the password on the second line.  This should be
all you need.  BTW, a function like the one I included will probably
be included with Quassia Gnus.
 
   Jason R. Mastaler                      jason@mastaler.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Authentication?
  1997-08-17 19:47 ` Authentication? Jason R Mastaler
@ 1997-08-18 19:47   ` Kevin Cheek
  1997-08-18 20:28     ` Authentication? Rolf Marvin B|e Lindgren
  1997-08-18 20:52     ` Authentication? Jason R Mastaler
  0 siblings, 2 replies; 5+ messages in thread
From: Kevin Cheek @ 1997-08-18 19:47 UTC (permalink / raw)
  Cc: ding


Thanks for the suggestion, but that doesn't fix the problem I'm
having.

The problem I am running into is that Gnus hangs during or right after
sending the AUTHINFO. With either nntp-send-nosy-authinfo or the
nntp-send-nosy-authinfo-from-file that you posted, Gnus simply
hangs. This problem was mentioned in several messages on this list (in
July, I think), but apparently no solution was ever found except to
hit C-g, which would allow them to read news. Unfortunately, hitting
C-g does not work for me as that simply causes Gnus to "Quit".

Does anyone know why Gnus hangs when using authentication?

-Kevin

-- 
 Kevin Cheek <kcheek@umich.edu>
 University of Michigan, Department of Internal Medicine
 Divisions of Rheumatology and Molecular Medicine & Genetics
 "Faith: not *wanting* to know what is true." -- Friedrich Nietzsche


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Authentication?
  1997-08-18 19:47   ` Authentication? Kevin Cheek
@ 1997-08-18 20:28     ` Rolf Marvin B|e Lindgren
  1997-08-18 20:52     ` Authentication? Jason R Mastaler
  1 sibling, 0 replies; 5+ messages in thread
From: Rolf Marvin B|e Lindgren @ 1997-08-18 20:28 UTC (permalink / raw)


[Kevin Cheek]

| This problem was mentioned in several messages on this list (in July,
| I think), but apparently no solution was ever found except to hit C-g,
| which would allow them to read news. Unfortunately, hitting C-g does
| not work for me as that simply causes Gnus to "Quit".

this happens to me as well.  I've never found a solution tho.  it's been
like this for quite some time.

-- 

       Rolf Lindgren           |       "The opinions expressed above are
       Sofienberggt. 13b       |        not necessarily those of anyone"
       N-0551 OSLO             |               roffe@ask.uio.no 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Authentication?
  1997-08-18 19:47   ` Authentication? Kevin Cheek
  1997-08-18 20:28     ` Authentication? Rolf Marvin B|e Lindgren
@ 1997-08-18 20:52     ` Jason R Mastaler
  1 sibling, 0 replies; 5+ messages in thread
From: Jason R Mastaler @ 1997-08-18 20:52 UTC (permalink / raw)


Kevin Cheek <kcheek@umich.edu> writes:

> Thanks for the suggestion, but that doesn't fix the problem I'm
> having.
> 
> The problem I am running into is that Gnus hangs during or right after
> sending the AUTHINFO. With either nntp-send-nosy-authinfo or the
> nntp-send-nosy-authinfo-from-file that you posted, Gnus simply
> hangs. This problem was mentioned in several messages on this list (in
> July, I think), but apparently no solution was ever found except to
> hit C-g, which would allow them to read news. Unfortunately, hitting
> C-g does not work for me as that simply causes Gnus to "Quit".
> 
> Does anyone know why Gnus hangs when using authentication?

I was the one who posted the questions in July, and a couple solutions
were in fact found.  One of which I posted, the other which I sent you
in a private e-mail.  Both fixed the hanging right after sending
AUTHINFO problem for me and several other people.  Have you tried both
of them?  Can you access this authenticated news server from the same
machine using another newsreader such as Netscape Navigator?

To reiterate, you should be able to get things working by adding 
either one (but not both) of the following to your .gnus or .emacs.

*interactively*
----
(add-hook 'nntp-server-opened-hook 'nntp-send-mode-reader)         
(add-hook 'nntp-server-opened-hook 'nntp-send-nosy-authinfo)          
(setq nntp-authinfo-function (function nntp-send-nosy-authinfo))
----

*reading authinfo from file*
----
(add-hook 'nntp-server-opened-hook
          (lambda ()
            (cond ((string-match "something.com" nntp-address)
                   (nntp-send-nosy-authinfo-from-file))
                  (t
                    ))))
 
(defun nntp-send-nosy-authinfo-from-file ()
  "Send the AUTHINFO to the nntp server, including username and password
  This function is supposed to be called from `nntp-server-opened-hook'."
  (when (file-exists-p "~/.nntp-authinfo")
    (nnheader-temp-write nil
      (insert-file-contents "~/.nntp-authinfo")
      (goto-char (point-min))
      (nntp-send-command
       "^.*\r?\n" "AUTHINFO USER"
       (buffer-substring (point) (progn (end-of-line) (point))))
      (goto-line 2)
      (nntp-send-command 
       "^.*\r?\n" "AUTHINFO PASS" 
       (buffer-substring (point) (progn (end-of-line) (point)))))))
----

   Jason R. Mastaler                      jason@mastaler.com
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-08-18 20:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-17 18:22 Authentication? Kevin Cheek
1997-08-17 19:47 ` Authentication? Jason R Mastaler
1997-08-18 19:47   ` Authentication? Kevin Cheek
1997-08-18 20:28     ` Authentication? Rolf Marvin B|e Lindgren
1997-08-18 20:52     ` Authentication? Jason R Mastaler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).