Execute script as sudo without password

Hello everyone,

I’m trying to automate the execution of a script with sudo rights, by disabling the usage of the password for the script.

So, I modified the sudoers configuration like this :
adminuser ALL=(root) NOPASSWD: /root/.local/bin/system-updater

It works for other systems with a root user, but not with Yunohost. I think the issue come from the (root) parameter but I can’t see what to do to fix it.

Thanks for the help !

The ‘dirty’ solution for me was to modify /etc/nsswitch.conf: the line sudoers: files ldap change to sudoers: ldap files.

It works but now I get a diagnosis issue. I wonder if there’s cleaner solution.