Description of problem:
rexec prompts for username and password regardless of whether or not
~/.netrc exists and/or contains this information. The rexec(3) call in
glibc is where the ~/.netrc parsing occurs, but by then rexec(1) will
have either prompted for username/password or exited.
It's effectively as though the '-n' option was automatically added.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Set up a ~/.netrc with username and password
2. run rexec without -n
You will be prompted for a username and password
The username and password for ~/.netrc are used
It appears the prompting was added in response to Bug#4328. The real
bug is/was that glibc's rexec(3) doesn't prompt for username/password
in the event that ~/.netrc doesn't supply them. AFAICT all other libcs
do prompt if needed. At any rate rexec is now broken according to it's
Probably the simplest solution is to duplicate ruserpass.c from
glibc-<version>/inet/ or from ftp (netkit-ftp). This way rexec can
process an existing ~/.netrc and then prompt for username/password if
needed before calling rexec(3). This is how our ftp(1) does it.
Created attachment 105217 [details]
Patch to read/parse ~/.netrc before prompting for username/passwd
I've verified the patch prevents the prompt when .netrc is populated and that
-n still causes rexec to prompt.
Correction to initial comments: rexec prompts for password but not
username (unless -n option specified).
Thanks Dave, fixed version will soon appear in errata
An errata has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.
The path netkit-rsh-0.17-rexec-netrc.patch is not in RHEL3 yet. I
think we still have development period for U5. I will add it to this
branch next week.