JBY Technologies

Fix sudo NOPASSWD failure

I was trying to assign sudo priviliges for a specific user and script on Centos 6. I could not get it to quit prompting for a password, despite having confirmed that the sequence and syntax were correct. Then I noticed this setting...

Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin

And realized that the script I had the user running was not in that path. I added my path to the secure_path...

Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/home/myuser/bin

And then it worked fine.

Bookmark and Share

Legal Notices