mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0130-p2v-Make-the-sudo-error-message-actionable.patch

e76f14
From 0d3ac31739bcfa3c4dc4adb66de07d6859735c35 Mon Sep 17 00:00:00 2001
e76f14
From: "Richard W.M. Jones" <rjones@redhat.com>
e76f14
Date: Thu, 23 Jun 2016 13:52:46 +0100
e76f14
Subject: [PATCH] p2v: Make the sudo error message actionable.
e76f14
e76f14
Updates commit 5b6a8e086264c85fb048c0eadff6c34351663133.
e76f14
e76f14
(cherry picked from commit 323c3e20a4d47fc5a0f1b5fcd3352f746c8bd9dd)
e76f14
---
e76f14
 p2v/ssh.c | 3 ++-
e76f14
 1 file changed, 2 insertions(+), 1 deletion(-)
e76f14
e76f14
diff --git a/p2v/ssh.c b/p2v/ssh.c
e76f14
index aa070d5..083e04e 100644
e76f14
--- a/p2v/ssh.c
e76f14
+++ b/p2v/ssh.c
e76f14
@@ -583,7 +583,8 @@ test_connection (struct config *config)
e76f14
 
e76f14
     case 102:
e76f14
       mexp_close (h);
e76f14
-      set_ssh_error ("sudo for user '%s' requires a password", config->username);
e76f14
+      set_ssh_error ("sudo for user \"%s\" requires a password.  Edit /etc/sudoers on the conversion server to ensure the \"NOPASSWD:\" option is set for this user.",
e76f14
+                     config->username);
e76f14
       return -1;
e76f14
 
e76f14
     case MEXP_EOF:
e76f14
-- 
aa0300
2.7.4
e76f14