Re: Sudoers (Was: Mac-on-Linux must be started by root?)


Subject: Re: Sudoers (Was: Mac-on-Linux must be started by root?)
From: Paul Schinder (schinder@pobox.com)
Date: Thu Feb 24 2000 - 18:38:35 MST


At 12:28 PM -0500 2/24/00, Ben Donley wrote:
>That rules. I'm doing that.
>
>My /etc/sudoers says that it MUST be edited with the 'visudo' command as
>root.
>
>I guess this is as good a time to learn vi as any, but does anyone want to
>explain this for me? What does visudo do that "su -c 'emacs /etc/sudoers'"
>doesn't?

If it's anything like vipw, it's to prevent corruption by more than
one person at a time trying to edit the file by using locks, and to
prevent the use of a "half written" copy once you're done. vipw
works on a copy of the file and then atomically replaces the old one.

Also, if it's anything like vipw, you can use any editor you want.
Just set the EDITOR environment variable. You won't have to use vi.
(Unless you want to. vi is a small, fast, powerful editor that is
worth learning, if only to not have to bring up the bloat of (x)emacs
every time you want to edit something.)

>
> - Ben
>
>On Feb 24, 2000 at 04:00AM -0700, space19@earthlink.net wrote:
> > I dont know if this is a properly secure way do do it but, I just set up
> > sudo so I can initially start mol without su'ing. All I had to do is put
> > this in /etc/sudoers:
> > my_username ALL = NOPASSWD: /usr/bin/startmol
> >
> > It's kind of nice because if mol dies on me I can ^C^C it without a
> > hassle.:-)
> >
> > sa

--
Paul Schinder
schinder@pobox.com



This archive was generated by hypermail 2a24 : Wed Mar 01 2000 - 00:07:11 MST