visudo and other editors [Was: add users to sudo file]

Andy Rabagliati andyr at wizzy.com
Mon Nov 15 12:41:52 UTC 2004


On Sun, 14 Nov 2004, Vram wrote:

> On Mon, 2004-11-15 at 15:16 +1100, Jeff Waugh wrote:
> > 
> > You can use other editors while still being protected from screwups by
> > visudo... Like this:
> > 
> >   EDITOR=nano visudo
> 
> So this makes nano use visudo checking rules????

visudo (and vipw, for the password file) copy the file to be edited
to a temporary file, edit it with $EDITOR, and then, when the edit
session is finished, runs a sanity check. If it passes, the temporary
file overwrites the original, with the correct permissions.

Cheers,    Andy!




More information about the ubuntu-users mailing list