cdrecord, cdrdao and gtoaster

Fernando Gleiser fgleiser at cactus.fi.uba.ar
Wed Apr 9 16:41:04 PDT 2003


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
>
>
>



More information about the freebsd-questions mailing list