Bug 41170 - inc doesn't prompt for a password when using pop
Summary: inc doesn't prompt for a password when using pop
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: nmh   
(Show other bugs)
Version: 7.1
Hardware: All Linux
Target Milestone: ---
Assignee: Florian La Roche
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-05-17 23:22 UTC by Ian Mortimer
Modified: 2007-04-18 16:33 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-21 09:33:00 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to build nmh with builtin ruserpass function. (507 bytes, patch)
2001-05-17 23:23 UTC, Ian Mortimer
no flags Details | Diff

Description Ian Mortimer 2001-05-17 23:22:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
The man page for inc says:

       When using POP, you will normally need to type  the  pass-
       word  for  your  account  on  the  POP server, in order to
       retrieve your messages.

However if you run `inc -host pop_server' it doesn't prompt for a password
The problem seems to be not with nmh itself but with the system ruserpass
Anyway the simple fix (not necessarily the best) is to apply the attached
patch which builds inc with ruserpass included in the nmh distribution. 

How reproducible:

Steps to Reproduce:
1. inc -host pop_server

Actual Results:  inc doesn't prompt for a password and after a delay

   inc: -ERR [AUTH] Password supplied for "user" is incorrect.

Expected Results:  inc should display:

Password (pop_server:user):

and after (correct) entry of the password retrieve the user's mail from the
pop server.

Additional info:

nmh built on other OSes (Compaq Tru64 Unix for example) works correctly
presumably because it defaults to using the builtin ruserpass in the
absence of a system supplied function.

The builtin ruserpass calls getpass which is a deprecated function.  From

   This function is obsolete. Do not use it.

If it's obsolete that probably means there's something better but I don't
know what and don't have time to investigate further. 

The workaround is to create a .netrc file with the user name and password
in this environment it's not acceptable to ask users to put passwords in a
plain text file.

Comment 1 Ian Mortimer 2001-05-17 23:23:31 UTC
Created attachment 18833 [details]
Patch to build nmh with builtin ruserpass function.

Note You need to log in before you can comment on or make changes to this bug.