diff --git a/http/centos-5.11/ks.cfg b/http/centos-5.11/ks.cfg index c1c974fdb..9b1036aaa 100644 --- a/http/centos-5.11/ks.cfg +++ b/http/centos-5.11/ks.cfg @@ -71,4 +71,4 @@ yum %post # sudo echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers -sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers +sed -i "s/^[^#].*requiretty/#Defaults requiretty/" /etc/sudoers diff --git a/http/centos-6.7/ks.cfg b/http/centos-6.7/ks.cfg index d7215076d..f6da105d7 100644 --- a/http/centos-6.7/ks.cfg +++ b/http/centos-6.7/ks.cfg @@ -66,4 +66,4 @@ nfs-utils sed -i -e 's/\(^SELINUX=\).*$/\1permissive/' /etc/selinux/config # sudo echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant -sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers +sed -i "s/^[^#].*requiretty/#Defaults requiretty/" /etc/sudoers diff --git a/http/centos-7.1/ks.cfg b/http/centos-7.1/ks.cfg index c5414695f..573a605da 100644 --- a/http/centos-7.1/ks.cfg +++ b/http/centos-7.1/ks.cfg @@ -76,5 +76,5 @@ bzip2 %post # sudo echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant -sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers +sed -i "s/^[^#].*requiretty/#Defaults requiretty/" /etc/sudoers %end