[NEW PATCH] BZ#736154 - Add rhevm_admin_password kernel param (via gerrit-bot)

Yotam Oron yoron at redhat.com
Tue Sep 13 08:16:22 UTC 2011


New patch submitted by Yotam Oron (yoron at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/932

commit f3c76738b9b587d71dfc1acd534d045dc9641a55
Author: Yotam Oron <yoron at redhat.com>
Date:   Tue Sep 13 11:16:24 2011 +0300

    BZ#736154 - Add rhevm_admin_password kernel param
    
    - Add rhevm_admin_password to kernel params
    - Override root password with the rhevm admin password (to be changed in
      the future to a rhevm admin user)
    
    Change-Id: Ibae326f6ce0358cfeb23fef5f75f9ebb41dcb679

diff --git a/vdsm_reg/vdsm-config b/vdsm_reg/vdsm-config
index f709e9a..ea52725 100755
--- a/vdsm_reg/vdsm-config
+++ b/vdsm_reg/vdsm-config
@@ -62,6 +62,9 @@ set_addresses() {
 				management_server_fingerprint=*)
 				management_server_fingerprint=${i#management_server_fingerprint=}
 				;;
+				rhevm_admin_password=*)
+				rhevm_admin_password=${i#rhevm_admin_password=}
+				;;
 				*)
 				;;
 			esac
@@ -103,6 +106,13 @@ set_addresses() {
 		else
 			echo "No management_server found." | tee -a $LOG
 		fi
+		if [ ! -z "$rhevm_admin_password" ]; then
+			echo "rhevm_admin_password: $rhevm_admin_password" >> $LOG 2>&1
+			unmount_config /etc/passwd /etc/shadow
+			/usr/sbin/usermod -p "$rhevm_admin_password" root
+			chage -E -1 root
+			persist /etc/shadow /etc/passwd
+		fi
 
 		if [ $fWriteConfig -gt 0 ]; then ## Save new configuration
 			ovirt_store_config /etc/vdsm-reg/vdsm-reg.conf




More information about the vdsm-patches mailing list