Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 720966 - The interactive mode of rhn-channel doesn't handle entered user name correctly
The interactive mode of rhn-channel doesn't handle entered user name correctly
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools (Show other bugs)
5.7
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Tomas Lestach
Jiří Mikulka
:
: 773102 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-13 07:10 EDT by Radek Bíba
Modified: 2014-10-06 09:47 EDT (History)
6 users (show)

See Also:
Fixed In Version: rhn-client-tools-0.4.20-63
Doc Type: Bug Fix
Doc Text:
Cause: Username not stripped. Consequence: Authentication fails, when entering username and password interactively. Result: Authentication succeeds, when entering correct credentials interactively.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-21 01:30:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0250 normal SHIPPED_LIVE rhn-client-tools bug fix update 2012-02-20 10:07:09 EST

  None (edit)
Description Radek Bíba 2011-07-13 07:10:51 EDT
Description of problem:
rhn-channel is now able to accept user name and/or password interactively (bug 641029). However, when both the user name and the password are entered interactively, rhn-channel fails to alter the channel subscription. Even though I'm absolutely sure that I'm entering the right data.

Version-Release number of selected component (if applicable):
rhn-client-tools-0.4.20-56.el5

How reproducible:
Always

Steps to Reproduce:
e.g., # rhn-channel -r -c rhel-i386-server-5-sts
Username:
(not copied here)
Password:
Error validating data at server:

Error Message:
    Invalid username/password combination
Error Class Code: 2
Error Class Info:
     Invalid username and password combination.

Additional info:
The problem is here in the script:
    62      if not OPTIONS.user and not OPTIONS.list:
    63          print("Username: ")
    64          OPTIONS.user = sys.stdin.readline()

First of all, the prompt should stay on the same line, but that's not fatal. What makes rhn-channel fail is the fact that readline() keeps the new line character and sends the entered user name and the new line to RHN. The code should read:

if not OPTIONS.user and not OPTIONS.list:
    print "Username: ",
    OPTIONS.user = sys.stdin.readline().rstrip('\n')
Comment 1 Tomas Lestach 2011-10-05 05:54:36 EDT
Fixed within Bug 567901.

spacewalk.git: bb748540104fc834ead706bb6c4ac45659b6cd98
Comment 4 Tomas Lestach 2011-10-25 08:15:07 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:
Username not stripped.
Consequence:
Authentication fails, when entering username and password interactively.
Result:
Authentication succeeds, when entering correct credentials interactively.
Comment 7 errata-xmlrpc 2012-02-21 01:30:19 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0250.html
Comment 8 Radek Bíba 2012-04-27 04:35:22 EDT
*** Bug 773102 has been marked as a duplicate of this bug. ***

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