Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 702084

Summary: [RHEL6] rhn-channel should emit cogent error message rather than backtrace when encountering a bad username or passwd.
Product: Red Hat Enterprise Linux 6 Reporter: Travis Gummels <tgummels>
Component: rhn-client-toolsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED ERRATA QA Contact: Martin Minar <mminar>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: mkoci, mminar
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: HTB
Fixed In Version: rhn-client-tools-1.0.0-66.el6 Doc Type: Bug Fix
Doc Text:
Previously, running the "rhn-channel -L" command with an incorrect username or password or as a user without permissions to administer the system in question caused it to terminate unexpectedly with a traceback. The rhn-channel utility has been corrected to display an appropriate error message in this situation.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 16:49:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Travis Gummels 2011-05-04 18:04:02 UTC
Description of problem:

rhn-channel emits a back trace instead of a cogent error message when run with -L and given either a bad username or bad password.

[ben@snog rhn]$ sudo rhn-channel -L
Username: rhn-gps-woodard
Password:

Traceback (most recent call last):
File "/usr/sbin/rhn-channel", line 145, in <module>
main()
File "/usr/sbin/rhn-channel", line 137, in main
channels = get_available_channels(OPTIONS.user, OPTIONS.password)
File "/usr/sbin/rhn-channel", line 94, in get_available_channels
key = client.auth.login(user, password)
File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
verbose=self.__verbose
File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
return self._parse_response(h.getfile(), sock)
File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
return u.close()
File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -2: 'unhandled internal exception: error.invalid_login'>


Version-Release number of selected component (if applicable):

rhn-setup-1.0.0-61.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. rhn-channel -L with bad username or bad password
2.
3.
  
Actual results:

back trace

Expected results:

cogent error message

Additional info:

Comment 1 Milan Zázrivec 2011-08-01 15:46:43 UTC
spacewalk.git master: 6ba24293db19d5675de87c0c6e05f03d22e5afad
satellite.git CLIENT-RHEL-6: e50e43e09967893d96189754f642a49fdae848bd

Comment 3 Milan Zázrivec 2011-08-08 15:13:18 UTC
    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: A bug in rhn-client-tools code.

Consequence: rhn-channel utility would throw a traceback when encountering bad username or password.

Fix: The fix was easy.

Result: rhn-channel utility now prints a cogent error message in the problematic situations.

Comment 4 Šimon Lukašík 2011-08-10 09:28:28 UTC
Flipping to Assigned:

When the error is trigged on interactive way (using -u and -p command-line
options), the error message appears without a trailing new line.

[root@localhost ~]# rhn-channel -L -u slukasik -p blabla
Error during client authentication: redstone.xmlrpc.XmlRpcFault:
Either the password or username is incorrect.[root@localhost ~]#

Comment 5 Milan Zázrivec 2011-08-10 10:08:32 UTC
Fix for thing described in comment #4:

spacewalk.git master: 3d3a4d9a4a53ca24d2650bdc9ed4813a09bcb72d
satellite.git CLIENT-RHEL-6: e50fad49f426814984ee637c095213f19b47ab5d

Comment 7 Martin Minar 2011-08-16 11:25:28 UTC
Verified in rhn-client-tools-1.0.0-67.el6

Reproducer:
[root@XYZ ~]# rhn-channel -L -u slukasik -p blabla
Error during client authentication: redstone.xmlrpc.XmlRpcFault: Either the password or username is incorrect.
[root@XYZ ~]#

Comment 8 Jaromir Hradilek 2011-10-27 16:27:49 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,7 +1 @@
-Cause: A bug in rhn-client-tools code.
+Previously, running the "rhn-channel -L" command with an incorrect username or password or as a user without permissions to administer the system in question caused it to terminate unexpectedly with a traceback. The rhn-channel utility has been corrected to display an appropriate error message in this situation.-
-Consequence: rhn-channel utility would throw a traceback when encountering bad username or password.
-
-Fix: The fix was easy.
-
-Result: rhn-channel utility now prints a cogent error message in the problematic situations.

Comment 9 errata-xmlrpc 2011-12-06 16:49:26 UTC
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-2011-1664.html