The goal is to let the www-data user execute sudo -u postgres -H osm2pgsql [some options here] without being asked for a password (as this will be part of a script wich runs automatically).
I thought I could do it with the following line in sudoers file
www-data ALL=NOPASSWD: /usr/bin/sudo -u postgres -H osm2pgsql *
But this does not seem to work. What am I doing wrong?