|
RES: apache mod_perl + suid question: msg#00195apache.mod-perl
Hello Tushar, Try this : $suid_file = "file_path/suidfile.pl"; $user = "nobody"; $passwd = "kdsak"; (system($suid_file,$user,$$passwd)) or die "Error in suid operation $! "; Note that suid_file need the following commands : - chmod 4750 - chown root:httpd Regards, Vitor -----Mensagem original----- De: pandit_tushar@xxxxxxx [mailto:pandit_tushar@xxxxxxx] Enviada em: sexta-feira, 26 de julho de 2002 19:41 Para: modperl@xxxxxxxxxxxxxxx Assunto: apache mod_perl + suid question Hello, I am trying to write a password changing program. For this I have a mod_perl subroutine from where I am trying to execute a perl script(with suid permissions 4711), which is a wrapper and in turn calls the usermod command on linux with the old and new passwords. The problem I am having: 1: The usermod command doesn't get executed. I have tried debugging this...by having a log file(/usr/local/apache/logs) and the mod_perl process does open the wrapper script..but then does nothing. It does not execute the command. What am I doing wrong ? I know there might be some quirks with suid permissons and I would like to know how can I overcome this. I have something like below from mod_perl subroutine: my $ret_val = `$wrapper`; Within the wrapper perl script, I call usermond with the passwds by doing: $ret = `$usermondcmd 2>&1` Any help would be much appreciated. thanks a lot. -Tushar |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: apache mod_perl + suid question: 00195, pandit_tushar |
|---|---|
| Next by Date: | PerlAccessHandler: 00195, Rasoul Hajikhani |
| Previous by Thread: | Re: apache mod_perl + suid questioni: 00195, Philip Mak |
| Next by Thread: | mod_perl PerlAccessHandler/PerlAuthenHandler question: 00195, Harry Zhu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |