Bug 733576

Summary: root password will lost after upgrade
Product: Red Hat Enterprise Linux 6 Reporter: Mohua Li <moli>
Component: ovirt-nodeAssignee: Alan Pevec <apevec>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.2CC: apevec, cshao, gouyang, leiwang, mburns, ovirt-maint, ycui
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-node-2.0.2-0.5.git83340dd.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 19:26:47 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 Mohua Li 2011-08-26 05:19:03 UTC
Description of problem:
                                                                                                                
have set password for both admin/root user, login correctly, after upgrade from  TUI menu, or from rhevm,                     
                                                                             will cost the root password lost, admin  login ok                                                              
                                                                                                                              
/etc/shadow,                                                                                                            
                                                                                                                   root:!!:15210:0:99999:7:::                                                                                                    
admin:$6$7vtKw5wIQL06r6mD$iKp.fPDqQYm6or3rYobXoC8xyCg8nTP8X7OaXndXvoH1Qglp65pGyj2OhrQ.xCw.xJ4PBxl.RHY1eaoyNQi.B0:15212:0:99999
+:7:::                                                                                                                        
                                                                                                          
                                                                                                                                                                 

Version-Release number of selected component (if applicable):
rhev-hypervisor 6.2-0.14(ovirt-config-password support set different password for admin/root)

How reproducible:
met this several times when upgrade from TUI or rhevm                                               
              

Steps to Reproduce:
1,have installed rhev-hypervisor, set password for both admin/root                                                            
2,upgrade from rhevm/TUI menu,                                                                                                
3,root password lost after upgrade,                                                                                     
  
Actual results:
root password lost after upgrade 

Expected results:


Additional info:

Comment 2 Mike Burns 2011-08-26 12:35:21 UTC
Are you assuming that setting the password in the TUI during install will set the password for the root user?  Or are you setting it using the rootpw commandline option?

Comment 4 Mohua Li 2011-08-28 08:02:21 UTC
setting all the password by TUI, no any rootpw used in this bug,  i assume that we only set the password for admin user in TUI, but we shouldn't clear the root password in upgrade

Comment 5 Mike Burns 2011-08-29 13:03:56 UTC
(In reply to comment #4)
> setting all the password by TUI, no any rootpw used in this bug,  i assume that
> we only set the password for admin user in TUI, but we shouldn't clear the root
> password in upgrade

I agree, we shouldn't touch the root password at all during upgrade, but from what you describe, you don't have a root password set at all.  Nothing in the TUI will set or change the root password.

Comment 7 Alan Pevec 2011-09-09 16:42:22 UTC
Keeps root password:
- with "upgrade" boot parameter
- in-place: mount /dev/cdrom /live; /usr/libexec/ovirt-config-boot /live

Clears root password:
- Upgrade via TUI

Root cause is a bug in ovirtfunctions.unmount_config:
--- a/scripts/ovirtfunctions.py
+++ b/scripts/ovirtfunctions.py
@@ -612,7 +612,7 @@ def unmount_config(files):
         if check_bind_mount(filename):
             ret = os.system('umount -n "%s" &>/dev/null' % filename)
             if ret == 0:
-                if os.path.exists('/config"%s"' % filename):
+                if os.path.exists('/config%s' % filename):
                     # refresh the file in rootfs if it was mounted over
                     if os.system('cp -a /config"%s" "%s" &> /dev/null' % (filename,filename)):
                         return True

Comment 10 errata-xmlrpc 2011-12-06 19:26:47 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-1783.html