well it is not a good idea to run php setuid, neither to run your web
server in your vpopmail user. which would effectively lead to your web
server able to delete user directories etc.
thus you can use an external perl script which can be invoked from php,
which has setuid. 
or if you prefer a C program or anything else in that matter...

Evren


On Sat, 30 Aug 2003, QingYan wrote:

> 
> ----- Original Message ----- 
> From: "Evren Yurtesen" <[EMAIL PROTECTED]>
> To: "QingYan" <[EMAIL PROTECTED]>
> Sent: Saturday, August 30, 2003 9:30 PM
> Subject: Re: [vchkpw] RE:(2) [vchkpw] Script for users to delete their own account
> 
> 
> > with php this is easy to accomplish with php, you just need to use an
> > external setuid program. inside this setuid program you can double check
> > the user password to be sure that the user is authenticated properly.
> > with perl something like this would work nicely. then you can put inside
> > blah blah the vdeluser $username command so your user is gone.
> > 
> > 
> >   $cryptpass=`$syshomedir/bin/vuserinfo -p $username`;
> >   $cryptpass=~ s/^\s+|\s+$//g;
> > 
> >   if(crypt($password, $cryptpass) eq $cryptpass) {
> > 
> >     blah blah
> > 
> >   }
> > 
> > 
> 
> Thank you very much.  I am quite new to php. 
> I don't have idea how to setuid to run php. 
> I read some information from website but still don't have any idea.
> 
>   
> 
> Regards,
> Qing.
> 



Reply via email to