From ea2fcb55388ec71fecf6a84ed8f5ac937ea37d25 Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Mon, 17 Mar 2014 16:37:56 -0700 Subject: [PATCH] Allow sudo access without a controlling terminal Ironic setup uses some external scripts that use sudo but they are not called with a TTY. This patch allows STACK_USER sudo access without a controlling terminal. Change-Id: I0c60fcd5d8418738405d4dd9d08fdf5c8f766829 --- stack.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/stack.sh b/stack.sh index 7fa4d37b07..38d8a64ba0 100755 --- a/stack.sh +++ b/stack.sh @@ -195,6 +195,7 @@ echo "$STACK_USER ALL=(root) NOPASSWD:ALL" >$TEMPFILE # Some binaries might be under /sbin or /usr/sbin, so make sure sudo will # see them by forcing PATH echo "Defaults:$STACK_USER secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin" >> $TEMPFILE +echo "Defaults:$STACK_USER !requiretty" >> $TEMPFILE chmod 0440 $TEMPFILE sudo chown root:root $TEMPFILE sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh