diff --git a/app/views/unattended/provisioning_templates/snippet/remote_execution_ssh_keys.erb b/app/views/unattended/provisioning_templates/snippet/remote_execution_ssh_keys.erb index 1f8d6b3010a..0d57a10243c 100644 --- a/app/views/unattended/provisioning_templates/snippet/remote_execution_ssh_keys.erb +++ b/app/views/unattended/provisioning_templates/snippet/remote_execution_ssh_keys.erb @@ -67,11 +67,11 @@ if [ ! -x "$(command -v sudo)" ]; then $PKG_MANAGER_INSTALL sudo fi <% if @host.operatingsystem.family == 'Redhat' || @host.operatingsystem.family == 'Debian' -%> -echo "<%= ssh_user %> ALL = (root) NOPASSWD : ALL" > /etc/sudoers.d/<%= ssh_user %> +echo "<%= ssh_user %> ALL = (ALL) NOPASSWD : ALL" > /etc/sudoers.d/<%= ssh_user %> echo "Defaults:<%= ssh_user %> !requiretty" >> /etc/sudoers.d/<%= ssh_user %> chmod 440 /etc/sudoers.d/<%= ssh_user %> <% elsif @host.operatingsystem.family == 'Suse' -%> -echo "<%= ssh_user %> ALL = (root) NOPASSWD : ALL" >> /etc/sudoers +echo "<%= ssh_user %> ALL = (ALL) NOPASSWD : ALL" >> /etc/sudoers echo "Defaults:<%= ssh_user %> !targetpw" >> /etc/sudoers chmod 440 /etc/sudoers.d/<%= ssh_user %> <% end -%>