sudo lock file?

King, Daniel Daniel.King at
Tue Jan 14 18:39:59 EST 2003

Hi, folks.
Has anyone here had trouble locking the sudoers file so that it won’t be overwritten/accessed?
I’d like to make automated changes to sudoers, based upon an external script, and I can’t seem to lock the file.  Are there particular rights I need to set?  I’ve tried a variety of tests, including /etc/stmp, /etc/sudoers.tmp, /etc/.sudoers.swp, /etc/.sudoers.swx – all to no avail.
(I don’t believe that sudo supports drop-in “include” files, which would be a better solution.)
visudo knows that the file is busy, so I don’t step on myself with multiple visudo sessions.  Is there some other locking mechanism?
Thanks in advance.
A. Daniel King,
sudo advocate

More information about the sudo-users mailing list