I think I see the problem.
In /etc/sudoers.d/99-maas-sudoers there is an entry as follows:
maas ALL= NOPASSWD: /usr/sbin/maas-rack scan-network *
Instead this should be placed in /etc/sudoers.d/99-maas-common-sudoers as follows:
maas ALL= NOPASSWD: /usr/lib/maas/maas-common scan-network *
I must have missed this when we moved the commands from /usr/sbin/maas-rack to /usr/lib/maas/maas-common.
I think I see the problem.
In /etc/sudoers. d/99-maas- sudoers there is an entry as follows:
maas ALL= NOPASSWD: /usr/sbin/maas-rack scan-network *
Instead this should be placed in /etc/sudoers. d/99-maas- common- sudoers as follows:
maas ALL= NOPASSWD: /usr/lib/ maas/maas- common scan-network *
I must have missed this when we moved the commands from /usr/sbin/maas-rack to /usr/lib/ maas/maas- common.