python - Execute particular file from all user as sudo without password -


my server having python script file user , group root , want file executed user sudo without password.

for have added in /etc/sudoers

username all=(all) nopasswd: /path/to/file.py 

but when execute other user accept root still prompt password

i execute file this

sudo python /path/to/file.py 

please me

in sudoers, command /path/to/file.py specified, not python.

execute command follow:

sudo /path/to/file.py 

note: make sure /path/to/file.py executable (have proper permission set, containing shebang line (#!/usr/bin/python ...))


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -