From 64f4323ae74ba617c704750db4c0d02dcc639d55 Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Tue, 12 Nov 2013 11:20:25 +0000 Subject: [PATCH] Allow heat-admin to sudo without tty This is needed to run scripts from devtest, in particular so that swift ring files can be distributed. Change-Id: Icbe8c5b24a0d494730357983f230a37a7f078de7 --- elements/rpm-distro/pre-install.d/00-allow-heat-admin-sudo | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 elements/rpm-distro/pre-install.d/00-allow-heat-admin-sudo diff --git a/elements/rpm-distro/pre-install.d/00-allow-heat-admin-sudo b/elements/rpm-distro/pre-install.d/00-allow-heat-admin-sudo new file mode 100755 index 000000000..4c5d5bdbf --- /dev/null +++ b/elements/rpm-distro/pre-install.d/00-allow-heat-admin-sudo @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +# heat-admin can not sudo without a tty by default +echo 'Defaults:heat-admin !requiretty' >> /etc/sudoers.d/heat-admin-notty +chmod 0440 /etc/sudoers.d/heat-admin-notty +visudo -c