Execute particular file from all user as sudo without password

my server having a python script file whose user and group is root and i want this file to be executed by all user as sudo without password.

for this i have added this is in /etc/sudoers

username ALL=(ALL) NOPASSWD: /path/to/file.py

but when execute from other user accept root still prompt for password

i execute file like this

sudo python /path/to/file.py

please help me

Source: ubuntu

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.