I have a python script that I run as root and it works fine. When I try to run it with another user (not root) I use sudo command, but it doesn't work.
As root, I have typed:
/usr/bin/python /somedir/someotherdir/myscript.py "some parameter"
As "A user" I have typed:
sudo /usr/bin/python /somedir/someotherdir/myscript.py "some parameter"
It doesn't works !?!?!?!
Python executes all right, but in some place of the script it looks like it cannot access some directory or get some library.
I have an entry in the
/etc/sudoers file like this:
"A user" ALL = NOPASSWD: /usr/bin/python
It looks like sudo doesn't grant complete root access to "A user" to execute
Can you tell me what could be wrong ?