[node-patches] Change in ovirt-node[master]: [DRAFT] engine: Set root password

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Feb 14 15:33:48 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: [DRAFT] engine: Set root password
......................................................................

[DRAFT] engine: Set root password

Change-Id: I7354f8d9d40cbf672ba0d345870ddf4171c34e1b
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/setup/engine_page.py
1 file changed, 22 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/75/12075/1

diff --git a/scripts/tui/src/ovirt/node/setup/engine_page.py b/scripts/tui/src/ovirt/node/setup/engine_page.py
index 6397560..c8c4083 100644
--- a/scripts/tui/src/ovirt/node/setup/engine_page.py
+++ b/scripts/tui/src/ovirt/node/setup/engine_page.py
@@ -169,6 +169,12 @@
         return self.ui_content()
 
 
+#
+#
+# Functions and classes to support the UI
+#
+#
+
 def findPort(engineServer, enginePort):
     """Function to find the correct port for a given server
     """
@@ -253,11 +259,6 @@
     return path, fingerprint
 
 
-#
-#
-# Functions and classes to support the UI
-#
-#
 class VDSM(NodeConfigFileSection):
     """Class to handle VDSM configuration in /etc/default/ovirt file
 
@@ -295,6 +296,22 @@
         sshd.restart()
 
 
+class SetRootPassword(utils.Transaction.Element):
+    title = "Setting root password and starting sshd"
+
+    def __init__(self, password):
+        super(SetRootPassword, self).__init__()
+        self.password = password
+
+    def commit(self):
+        passwd = utils.security.Passwd()
+        passwd.set_password("root", self.password)
+
+        sshd = utils.security.Ssh()
+        sshd.password_authentication(True)
+        sshd.restart()
+
+
 class ActivateVDSM(utils.Transaction.Element):
     title = "Activating VDSM"
 


--
To view, visit http://gerrit.ovirt.org/12075
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7354f8d9d40cbf672ba0d345870ddf4171c34e1b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list