[sudo-users] script runs using sudo but not as root
mike at mpi-cbg.de
Wed Jan 21 04:00:45 EST 2009
I tried to eliminate some of the details to help make the problem more
The script is the run_cfengine.sh script which as you can expect runs
GNU's cfengine on the client. These systems are part of a cluster, up
until recently they were all running CentOS 4.3. I upgraded 8 of the
nodes to 64-bit CentOS 5.2. All the files that cfengine touches reside
on a NFS mounted disk array.
The strange thing is that the cfengine configuration wasn't touched,
as wasn't the files that are pushed over to the cluster nodes (eg. the
sudoers file). The 64-bit nodes cfengine script works, but the older
32-bit nodes gotten broken somehow in the process.
The problem is more of "what is sudo doing right?", because even if
I'm logged in as root the script fails when I try to run it, but if I
run it using sudo it runs without a problem. As my first email showed
hopefully with the included sudoers file, our sudo setup is as basic
as it can get, root and our three administrators have all sudo rights.
No changes to how paths are inherited or anything, sudo is running
under the environment of the calling user as per default.
On Jan 20, 2009, at 7:40 PM, Russell Van Tassell wrote:
> On Tue, Jan 20, 2009 at 01:31:54PM +0100, Mike Gallamore wrote:
>> I have a strange problem were a script that is owned by root, gives
>> an error when run as root but not when run using sudo. Anyone seen
>> this before? Know of a way to fix it?
>> sudo version 1.6.7p5
>> system running CentOS 4.3
> Think you might need to be a bit more specific, here (ie. what's the
> command that's failing).
> Any chance it's running on a remote filesystem or similar where the
> user is mapped to something like "nobody" or similar?
> Russell M. Van Tassell
> russell at loosenut.com
> Do not read this fortune under penalty of law. Violators will be
> prosecuted. (Penal Code sec. 2.3.2 (II.a.))
More information about the sudo-users