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 cd5c2e0fe8a..0a06ca45737 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 @@ -59,10 +59,10 @@ EOF <% if ssh_user != 'root' && host_param('remote_execution_effective_user_method') == 'sudo' -%> <% 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 %> <% 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 <% end -%> <% end -%>