All the commands that are listed in my sudoers file take parameters with absolute path only or else shows the error that the user is not allowed to run command as sudo on xyzserver.

Example : file is in /apps/tomcat/conf/server.xml If I go to this directory and run vi server.xml I get the error but if I do vi /apps/tomcat/conf/server.xml then it works.

Entry in sudoers file is to allow only /usr/bin/vim /*/apps/

How can I change this so that vi server.xml works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.