RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
From: Mumia W. [mailto:[EMAIL PROTECTED] >> Go into sudoers and replace the name of the binary with the name of a >> script that echoes the real and effective user and group ids. Thanks Mumia, and thanks to all who responded. As it turns out, I was able to resolve the problem by replacing '/bin

Re: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Mumia W.
On 10/05/2006 07:10 PM, RICHARD FERNANDEZ wrote: From: Mumia W. [mailto:[EMAIL PROTECTED] Does the webserver have the proper permissions to invoke that sudo entry? AFAIK, yes. I don't think it would be asking for a password if it couldn't run the binary. It just doesn't seem to be pulling

RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
-Original Message- From: Igor Sutton [mailto:[EMAIL PROTECTED] Sent: Thursday, October 05, 2006 8:17 PM To: RICHARD FERNANDEZ Cc: Beginners List Subject: Re: Can't get Sudo.pm to run my command but it works from a prompt > Looks like this may not, strictly speaking, be a Perl

Re: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Igor Sutton
Looks like this may not, strictly speaking, be a Perl question any more, but can anyone point me in the right direction? I can definitely run things out of cgi-bin, otherwise I wouldn't have gotten this far. Most times, apache uses nobody or www user. Check if the user apache uses is mention

RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
From: Mumia W. [mailto:[EMAIL PROTECTED] > Does the webserver have the proper permissions to invoke that sudo entry? AFAIK, yes. I don't think it would be asking for a password if it couldn't run the binary. It just doesn't seem to be pulling the right entry (webuser) out of the sudoers file,

Re: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Mumia W.
On 10/05/2006 03:23 PM, RICHARD FERNANDEZ wrote: if the user has never signed in and the admin never ran passwd user passwd -f user and then that user never went into make his/her password permenant then yes it would matter b/c the passwd is not set. I've gone in and set a passwd for the u

RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
> if the user has never signed in and the admin never ran > passwd user passwd -f user and then that user never went into > make his/her password permenant then yes it would matter b/c > the passwd is not set. > I've gone in and set a passwd for the user. Then I actually logged in as the user

RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Derek B. Smith
--- RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: > > Did you edit the sudoers file using visudo -f > "file" > > Yes. > > > Show us the sudoers file using cat -etu "file". > > # cat -etu /usr/local/etc/sudoers > > /tmp/sudoers.richf > # less /tmp/sudoers.richf > # sudoers file. > # > # This file

RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
> Did you edit the sudoers file using visudo -f "file" Yes. > Show us the sudoers file using cat -etu "file". # cat -etu /usr/local/etc/sudoers > /tmp/sudoers.richf # less /tmp/sudoers.richf # sudoers file. # # This file MUST be edited with the 'visudo' command as root. # User privilege specif

Re: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Derek B. Smith
-- RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: > Hi folks, > > I have the following in a CGI script: > > > When this code gets run (via webpage) I get the > following in the > error_log: > > > > output: > > result: 256 > > STDOUT: > STDERR: > We trust you have received the usual lectu

Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
Hi folks, I have the following in a CGI script: my $replace = Sudo->new( { sudo => $sudo, debug => 3, username => 'root', program => '/bin/cp',