Bug 707288 - firstboot is not skipping login screen for already registered systems
Summary: firstboot is not skipping login screen for already registered systems
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools
Version: 5.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Pazdziora
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On:
Blocks: 675214 799926
TreeView+ depends on / blocked
 
Reported: 2011-05-24 15:38 UTC by Adrian Likins
Modified: 2016-07-04 00:56 UTC (History)
5 users (show)

Fixed In Version: rhn-client-tools-0.4.20-54.el5
Doc Type: Bug Fix
Doc Text:
Previously, in a case that a system was already registered with RHN Classic, the firstboot utility did not skip the registration screen. Therefore, the system had to be registered again. Now, this screen is skipped and the message "you are already registered" is displayed.
Clone Of:
: 799926 (view as bug list)
Environment:
Last Closed: 2011-07-21 07:09:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0997 0 normal SHIPPED_LIVE rhn-client-tools bug fix and enhancement update 2011-07-20 15:44:52 UTC

Description Adrian Likins 2011-05-24 15:38:17 UTC
Description of problem:

Firstboot does not appear to be skipping the login/register screen
if the system is already registered. Instead, it shows it, and
if you enter credentials, it reregisters the system. In a possibly
secondary bug, this also causes it to use the wrong credentials
for consumer authed api calls, and they all fail. 


Version-Release number of selected component (if applicable):
rhel5.7 stuff

How reproducible:


Steps to Reproduce:
1. register a system
2. run /usr/sbin/firstboot
3. get to the login screen
  

Expected results:

I think this screen should be getting skipped and a "you are already registered" screen shown instead. This seems to be what RHEL6 does. 


Additional info:

Comment 1 Adrian Likins 2011-05-25 14:58:31 UTC
-- /home/adrian/src/subscription-manager/rhn_start_gui.py	2011-05-25 10:40:42.000000000 -0400
+++ /usr/share/firstboot/modules/rhn_start_gui.py	2011-04-12 04:59:22.000000000 -0400
 -49,14 +49,14 @@
         if rhnreg.registered():
             return True
         try:
-            _rhsm_path = "/usr/share/rhsm/subscription_manager"
+            _rhsm_path = "/usr/share/rhsm"
             _rhsm_path_added = False
             if _rhsm_path not in sys.path:
                 sys.path.append(_rhsm_path)
                 _rhsm_path_added = True
             import certlib
             if _rhsm_path_added:
-                sys.path.remove("/usr/share/rhsm/subscription_manager")
+                sys.path.remove("/usr/share/rhsm")
             return certlib.ConsumerIdentity.existsAndValid()
         except:
             return False

Seems to fix it.

Comment 3 Chris Duryee 2011-05-25 15:31:00 UTC
setting flags for 5.7. Currently, if a user runs firstboot after registering with subscription-manager, they will be prompted to re-enter their credentials. At this point, a new consumer cert will be created, which causes confusion inside of subscription-manager.

as noted in comment #1, there is a secondary bug for subscription-manager to handle the creation of the new consumer cert correctly, but if the user is not prompted for credentials again, they will not hit that scenario.

Comment 4 Jan Pazdziora 2011-05-26 09:04:59 UTC
Taking.

Comment 7 Adrian Likins 2011-05-26 13:56:17 UTC
/usr/share/rhsm/subscription_manager is the path the subscription manager code is in on RHEL5.7. It moved from /usr/share/rhsm on approx Mar 29.

Note: RHEL6 branch _still_ lives in /usr/share/rhsm and not /usr/share/rhsm/subscription_manager. This will probably also change when we get to rebase RHEL6 subscription-manager to master, probably ~6.2 time frame.

Comment 8 Jan Pazdziora 2011-05-26 14:22:42 UTC
(In reply to comment #7)
> /usr/share/rhsm/subscription_manager is the path the subscription manager code
> is in on RHEL5.7. It moved from /usr/share/rhsm on approx Mar 29.

Aha. So the patches are exactly reverse, and the bugzilla is generally about "we've changed location of subscription manager, please update rhn-client-tools to match the new location", is that correct?

Comment 9 Jan Pazdziora 2011-05-26 14:23:15 UTC
Setting devel ack.

Comment 10 Adrian Likins 2011-05-26 14:52:35 UTC
re 8, ah, indeed, sorry for the reversed patch. Yes, paths have changed and need to be updated. Sorry for no heads up on that change.

Comment 11 Chris Duryee 2011-05-26 19:48:00 UTC
Jan,

Would it be possible to get this into RC snapshot 2? We are targetting then to get other subscription-manager fixes in, it would be good to get this in there too so they can be QE'd in the compose in lump sum.

Comment 15 Jan Pazdziora 2011-05-31 11:49:04 UTC
Fixed in trunk:

Sending        rhn-client-tools/src/firstboot/rhn_start_gui.py
Transmitting file data .
Committed revision 203647.

Comment 16 Jan Pazdziora 2011-05-31 12:02:45 UTC
Tagged and built as rhn-client-tools-0.4.20-54.el5.

Comment 17 Chris Duryee 2011-05-31 19:54:16 UTC
I just tested the brew build, and it works as expected. Users are not prompted for login credentials within firstboot if they have already logged in.

Comment 20 Eliska Slobodova 2011-06-29 12:01:32 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:
Previously, in a case that a system was already registered with RHN Classic, the firstboot utility did not skip the registration screen. Therefore, the system had to be registered again. Now, this screen is skipped and the message "you are already registered" is displayed.

Comment 21 errata-xmlrpc 2011-07-21 07:09:00 UTC
An advisory 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 therefore 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.

http://rhn.redhat.com/errata/RHBA-2011-0997.html

Comment 22 errata-xmlrpc 2011-07-21 12:29:39 UTC
An advisory 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 therefore 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.

http://rhn.redhat.com/errata/RHBA-2011-0997.html


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