From: Michael Heiming <michael@heiming.de>
Subject: Re: running a script with sudo
Date: Wed, 29 Aug 2001 21:16:37 +0200 [thread overview]
Message-ID: <l2fjm9.2s9.ln@charon.heiming.de> (raw)
In-Reply-To: 3B8BD0F8.187AC11D@sels.rsc.raytheon.com
Bryan Dunn wrote at Tuesday 28 August 2001 19:12 like only he can:
> Hi all,
> I am having trouble running a script with sudo permissions. I put
> a
> line in the sudoers file which looks like this:
> Cmnd_alias MOUNTCD = /usr/mount_dec_cd.pl
>
>
> then later on:
>
> username machine = MOUNTCD
>
> The script runs fine as root, but it will not work as the user.
> First, it can't use the command scu sho edt, and then produces other
> errors.
>
> What am I doing wrong?
# 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
# Cmnd alias specification
# User privilege specification
I somehow miss the last entry, which will be the only one you really
need if all you want, is that one user should be able to use one
command as root.
username ALL=/path_to/script
^^^^^^^
<TAB>
I haven't used sudo with perl scripts, but it works fine with
binaries/shell scripts on 4.0F&5.1.
Michael Heiming
prev parent reply other threads:[~2001-08-29 19:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-28 17:12 running a script with sudo Bryan Dunn
2001-08-29 19:16 ` Michael Heiming [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox