From owner-freebsd-questions@FreeBSD.ORG Wed Apr 9 16:41:04 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8042437B43A for ; Wed, 9 Apr 2003 16:41:04 -0700 (PDT) Received: from cactus.fi.uba.ar (cactus.fi.uba.ar [157.92.49.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C21643F3F for ; Wed, 9 Apr 2003 16:40:32 -0700 (PDT) (envelope-from fgleiser@cactus.fi.uba.ar) Received: from cactus.fi.uba.ar (cactus.fi.uba.ar [157.92.49.108]) by cactus.fi.uba.ar (8.12.3/8.12.3) with ESMTP id h39Na7WG094497; Wed, 9 Apr 2003 20:36:22 -0300 (ART) (envelope-from fgleiser@cactus.fi.uba.ar) Date: Wed, 9 Apr 2003 20:35:47 -0300 (ART) From: Fernando Gleiser To: "E. J. Cerejo" In-Reply-To: <3E94A93B.7050403@netscape.net> Message-ID: <20030409201633.L91268-100000@cactus.fi.uba.ar> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-120.1 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, QUOTE_TWICE_1,REPLY_WITH_QUOTES,USER_IN_WHITELIST version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: freebsd-questions Subject: Re: cdrecord, cdrdao and gtoaster X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 23:41:04 -0000 On Wed, 9 Apr 2003, E. J. Cerejo wrote: > > I've heard very good things about sudo but I was never able to figure > out on how to write the sudoers file from reading the man page, I tried > to use it for the mount command before I ended up doing something else > to solve that problem instead of sudo and since then I haven't fooled > around with sudo anymore. I looked for a simple tutorial on it but > didn't find much documentation except for the manuals. > That's true. You almost need to take a compiler's course to understand it. It has more BNF than the ipf docs. It's easier if you have an example handy. Here's some example sudoers file I use to dump the database backup to disk. The database dump needs oracle's user env, but you need to be root in order to write to the tape. Feel free to modify it to suit your needs: ---------------8< cut here 8< ------------------------- # sudoers file. # # This file MUST be edited with the 'visudo' command as root. # # See the sudoers man page for the details on how to write a sudoers file. # # Host alias specification # User alias specification User_Alias ORA = oracle # Cmnd alias specification Cmnd_Alias TAR = /bin/tar # Defaults specification # User privilege specification root ALL=(ALL) ALL # Uncomment to allow people in group wheel to run all commands Uncomment to allow people in group wheel to run all commands # %wheel ALL=(ALL) ALL # Same thing without a password # %wheel ALL=(ALL) NOPASSWD: ALL # Samples # %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom # %users localhost=/sbin/shutdown -h now oracle ALL = NOPASSWD: TAR ---------------8< cut here 8< ------------------------- Hope this helps Fer > > >