Date: Wed, 9 Apr 2003 20:35:47 -0300 (ART) From: Fernando Gleiser <fgleiser@cactus.fi.uba.ar> To: "E. J. Cerejo" <edinho64@netscape.net> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: cdrecord, cdrdao and gtoaster Message-ID: <20030409201633.L91268-100000@cactus.fi.uba.ar> In-Reply-To: <3E94A93B.7050403@netscape.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030409201633.L91268-100000>