[sudo-users] Any way to avoid using full path name in sudoedit?

User Jody jody at filbert.sgt-inc.com
Wed Jun 27 12:48:10 EDT 2007



I am new to using sudo, so please excuse me if I have overlooked this in the documentation.  I have read it, and I have searched the mail list archives as well.


I am running sudo-1.6.8p12 on FreeBSD.


I want to allow certain users to be able to edit any file in ‘/usr/local/majordomo/lists’.  I have entered the following in my sudoers file:


User_Alias     USERADMINS = userone, usertwo

USERADMINS   ALL = /usr/sbin/adduser, /usr/sbin/rmuser, \

                  /usr/bin/passwd, \

                  sudoedit /usr/local/majordomo/lists/*



The command ‘sudoedit /usr/local/majordomo/lists/filename’   will work.



However, if I change directory to ‘/usr/local/majordomo/lists’ and try the command ‘sudoedit filename’ It doesn’t work.


I was hoping that my useradmins would not have to enter the full path name to the file every time they needed to update one.


Is there any way to get around having to use the full path name and still be able to restrict access to a certain directory?


Any advise you can offer would be appreciated.


Thank you,


Jody B. Caldwell

More information about the sudo-users mailing list