Re: [vchkpw] RE:(2) [vchkpw] Script for users to delete their own account

2003-09-01 Thread Tom Collins
On Saturday, August 30, 2003, at 10:52  AM, Evren Yurtesen wrote:
1. Auth the user against the database using their email/passwd
2. Change the last auth value to a year ago.
3. Display a message that they have until the next quarter hour
   to change their mind about deleting their account, and if they
   decide to keep it, to pop into their mailbox.
4. cron the vdeloldusers to run at */15.
How about a suid program that you could pass an email address and 
password to and it would outright delete the account?  It could be run 
as any user, and would take care of authentication and deletion in one 
shot.

--
Tom Collins
[EMAIL PROTECTED]
http://sniffter.com/ - info on the Sniffter hand-held Network Tester



Re: [vchkpw] RE:(2) [vchkpw] Script for users to delete their own account

2003-08-31 Thread QingYan

- Original Message - 
From: "Shane Chrisp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 30, 2003 11:45 PM
Subject: RE: [vchkpw] RE:(2) [vchkpw] Script for users to delete their own account


> I think the following would be sufficient.
> 
> 1. Auth the user against the database using their email/passwd
> 2. Change the last auth value to a year ago.
> 3. Display a message that they have until the next quarter hour
>to change their mind about deleting their account, and if they
>decide to keep it, to pop into their mailbox.
> 4. cron the vdeloldusers to run at */15.
> 
> Can you think of anything I have missed?
> 
> Shane
> 

Cool.  I think it would work.  
Is that vdelolduser uses lastauth to determine whether user old enough to delete?  I 
got some users who haven't logged but when I use vdelolduser, they are not in the 
deletion list.

Qing.

RE: [vchkpw] RE:(2) [vchkpw] Script for users to delete their own account

2003-08-30 Thread Shane Chrisp
I think the following would be sufficient.

1. Auth the user against the database using their email/passwd
2. Change the last auth value to a year ago.
3. Display a message that they have until the next quarter hour
   to change their mind about deleting their account, and if they
   decide to keep it, to pop into their mailbox.
4. cron the vdeloldusers to run at */15.

Can you think of anything I have missed?

Shane

>
>Thats something I havent thought of also :) Yet you should 
>wait until the
>vdeloldusers program is run after you set your account to be deleted.
>
>I think the best way is to run it from php by utilizing an external
>program/script which has setuid. Which double checks the 
>username/password
>to be sure that the person who runs the script is the actual user.
>
>Evren




RE: [vchkpw] RE:(2) [vchkpw] Script for users to delete their own account

2003-08-30 Thread Shane Chrisp
Now that's actually an idea I hadnt thought of. You could change the last
auth field for the user to some value like 12 months ago in the databasr
and then cron the vdeloldusers to delet anyone older than that value. 
This wouldn't require any special permissions/perl scripts, just a crontab 
entry.

Shane


>Well, if you are using mysql, why dont you use the veloldusers program
>periodicly to delete unused accounts? you can perhaps delete 
>accounts not
>logged in for 3 months. Like hotmail does.
>
>I think its a really bad idea to think that user will delete his email
>when he doesnt use it :) Well I dont think anybody would go 
>through this.
>Why would somebody delete their own account anyhow? even if 
>they are not
>going to use it anymore.
>
>




[vchkpw] RE:(2) [vchkpw] Script for users to delete their own account

2003-08-30 Thread Evren Yurtesen
Well, if you are using mysql, why dont you use the veloldusers program
periodicly to delete unused accounts? you can perhaps delete accounts not
logged in for 3 months. Like hotmail does.

I think its a really bad idea to think that user will delete his email
when he doesnt use it :) Well I dont think anybody would go through this.
Why would somebody delete their own account anyhow? even if they are not
going to use it anymore.


Evren

On Sat, 30 Aug 2003, Shane Chrisp wrote:

> Hi Jonas,
> 
> Yes true, I have also been talking with Qing in private emails so I sorta
> crossed over
> a little bit. :-)
> 
>  Personally I think there is a need for another small tool/program similar
> to
> clearopensmtp that would look at the vpopmail table, and given a certain
> value in the
> uid/gid field, or even by adding another field that marks the user for
> deletion and
> then calls the vdeluser functions. If I had enough time, I would look into
> this a bit
> further, but I have too much to do as it is.
> 
> Shane
> 
> >-Original Message-
> >From: Jonas Pasche [mailto:[EMAIL PROTECTED] 
> >Sent: Saturday, 30 August 2003 6:37 PM
> >To: [EMAIL PROTECTED]
> >Subject: RE: [vchkpw] Script for users to delete their own account
> >
> >
> >Hi Shane,
> >
> >> Or another option is to just add the user to mysql and send an email
> >> to the new account and let vpopmail create it for you.
> >
> >His question was about _deleting_ users ;-)
> >
> >Jonas
> >
> >
> >
> >
> 
> 
> 





RE: [vchkpw] Script for users to delete their own account

2003-08-30 Thread Shane Chrisp
Hi Jonas,

Yes true, I have also been talking with Qing in private emails so I sorta
crossed over
a little bit. :-)

 Personally I think there is a need for another small tool/program similar
to
clearopensmtp that would look at the vpopmail table, and given a certain
value in the
uid/gid field, or even by adding another field that marks the user for
deletion and
then calls the vdeluser functions. If I had enough time, I would look into
this a bit
further, but I have too much to do as it is.

Shane

>-Original Message-
>From: Jonas Pasche [mailto:[EMAIL PROTECTED] 
>Sent: Saturday, 30 August 2003 6:37 PM
>To: [EMAIL PROTECTED]
>Subject: RE: [vchkpw] Script for users to delete their own account
>
>
>Hi Shane,
>
>> Or another option is to just add the user to mysql and send an email
>> to the new account and let vpopmail create it for you.
>
>His question was about _deleting_ users ;-)
>
>Jonas
>
>
>
>




RE: [vchkpw] Script for users to delete their own account

2003-08-30 Thread Jonas Pasche
Hi Shane,

> Or another option is to just add the user to mysql and send an email
> to the new account and let vpopmail create it for you.

His question was about _deleting_ users ;-)

Jonas




Re: [vchkpw] Script for users to delete their own account

2003-08-30 Thread QingYan

- Original Message - 
From: "Jonas Pasche" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 30, 2003 6:27 PM
Subject: Re: [vchkpw] Script for users to delete their own account


> Hi Qing,
> 
> > I am using vQregister for users to regsiter email account.
> 
> Ah, ok - it's setuid, so it always runs with the right permissions.
> 
> > vQregister runs as vpopmail.vchkpw.  I have tried to php to call vuserinfo in 
> > /home/vpopmail/bin/ but it returns nothing.  I think it is the premission problem.
> > Apache is runing as wwwrun.nogroup.  So I don't know how should I do now.
> 
> There's a couple a possibilities:
> 
> 1) To let PHP scripts run under a different user than the webserver, use
>suPHP (http://www.suphp.org/)
> 
> 2) Use a perl script with suidperl
> 
> 3) Write a C program and make it setuid
> 
> 4) Configure sudo to call vdeluser with vpopmail permissions
> 
> 5) Something I haven't thought about yet
> 
> All of these are beyond the scope of using vpopmail; please inform
> yourself through the according documentation.
> 
> Or, probably the cleanest solution: Ask the vQregister authors to
> implement such a "delete myself" function.
> 
> Jonas
> 
> 

Thank you very much for your information.


Regards,
Qing.

RE: [vchkpw] Script for users to delete their own account

2003-08-30 Thread Shane Chrisp
Or another option is to just add the user to mysql and send an email
to the new account and let vpopmail create it for you.

>-Original Message-
>From: Jonas Pasche [mailto:[EMAIL PROTECTED] 
>Sent: Saturday, 30 August 2003 6:28 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [vchkpw] Script for users to delete their own account
>
>
>Hi Qing,
>
>> I am using vQregister for users to regsiter email account.
>
>Ah, ok - it's setuid, so it always runs with the right permissions.
>
>> vQregister runs as vpopmail.vchkpw.  I have tried to php to 
>call vuserinfo in /home/vpopmail/bin/ but it returns nothing.  
>I think it is the premission problem.
>> Apache is runing as wwwrun.nogroup.  So I don't know how 
>should I do now.
>
>There's a couple a possibilities:
>
>1) To let PHP scripts run under a different user than the 
>webserver, use
>   suPHP (http://www.suphp.org/)
>
>2) Use a perl script with suidperl
>
>3) Write a C program and make it setuid
>
>4) Configure sudo to call vdeluser with vpopmail permissions
>
>5) Something I haven't thought about yet
>
>All of these are beyond the scope of using vpopmail; please inform
>yourself through the according documentation.
>
>Or, probably the cleanest solution: Ask the vQregister authors to
>implement such a "delete myself" function.
>
>Jonas
>
>
>
>




Re: [vchkpw] Script for users to delete their own account

2003-08-30 Thread Jonas Pasche
Hi Qing,

> I am using vQregister for users to regsiter email account.

Ah, ok - it's setuid, so it always runs with the right permissions.

> vQregister runs as vpopmail.vchkpw.  I have tried to php to call vuserinfo in 
> /home/vpopmail/bin/ but it returns nothing.  I think it is the premission problem.
> Apache is runing as wwwrun.nogroup.  So I don't know how should I do now.

There's a couple a possibilities:

1) To let PHP scripts run under a different user than the webserver, use
   suPHP (http://www.suphp.org/)

2) Use a perl script with suidperl

3) Write a C program and make it setuid

4) Configure sudo to call vdeluser with vpopmail permissions

5) Something I haven't thought about yet

All of these are beyond the scope of using vpopmail; please inform
yourself through the according documentation.

Or, probably the cleanest solution: Ask the vQregister authors to
implement such a "delete myself" function.

Jonas




Re: [vchkpw] Script for users to delete their own account

2003-08-30 Thread QingYan

- Original Message - 
From: "Jonas Pasche" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 30, 2003 5:30 PM
Subject: Re: [vchkpw] Script for users to delete their own account


> Hi Qing,

> Okay, so you already have a web interface where they can subscribe,
> right? So it's not a question of "finding a script" rather than "how do
> I implement this in my script?", right?

I am using vQregister for users to regsiter email account.

> exec() is wrong; system() is right. The biggest problem is about
> permissions. Under which user do you have your script running? It needs
> write access to the directory of your domains, so normally the rights of
> the "vpopmail" user, or another user if you created the domain with "-u
> ".

vQregister runs as vpopmail.vchkpw.  I have tried to php to call vuserinfo in 
/home/vpopmail/bin/ but it returns nothing.  I think it is the premission problem.
Apache is runing as wwwrun.nogroup.  So I don't know how should I do now.

> 
> Question: How do you _create_ new users?
> 
> Jonas
> 
I create user by using vadduser manually but users can create their onw witn 
vQregsiter.

Qing.
 

Re: [vchkpw] Script for users to delete their own account

2003-08-30 Thread Jonas Pasche
Hi Qing,

> > Do you really want a web interface for solely letting users delete their
> > account? Why should they do so? Or are you looking for a function to
> > integrate into an existing web environment?
> 
> I want users to delete their own account if they are not going to use the service 
> any more.

Okay, so you already have a web interface where they can subscribe,
right? So it's not a question of "finding a script" rather than "how do
I implement this in my script?", right?

> Would you please give me more detail? I am not sure how to do.  Thanks a lot.
> I have tried to use php to do exec() and system() but failed.

exec() is wrong; system() is right. The biggest problem is about
permissions. Under which user do you have your script running? It needs
write access to the directory of your domains, so normally the rights of
the "vpopmail" user, or another user if you created the domain with "-u
".

Question: How do you _create_ new users?

Jonas




Re: [vchkpw] Script for users to delete their own account

2003-08-30 Thread QingYan

- Original Message - 
From: "Jonas Pasche" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 30, 2003 4:57 PM
Subject: Re: [vchkpw] Script for users to delete their own account


> Hi ,
> 
> please give yourself a realname when posting to a mailing list. Thanks.
> 
I am sorry about that.

> 
> Do you really want a web interface for solely letting users delete their
> account? Why should they do so? Or are you looking for a function to
> integrate into an existing web environment?

I want users to delete their own account if they are not going to use the service any 
more.

> 
> In either case, simply let the user log in (= check his password), then
> issue "vdeluser @domain.tld", e.g. with a system() command or
> using the vpopmail API, and done. Don't forget to kick the user out of
> the web interface immediately, as he doesn't have any more privileges.
> 
> Jonas
> 
Would you please give me more detail? I am not sure how to do.  Thanks a lot.
I have tried to use php to do exec() and system() but failed.

Regard,
Qing.

Re: [vchkpw] Script for users to delete their own account

2003-08-30 Thread Jonas Pasche
Hi ,

please give yourself a realname when posting to a mailing list. Thanks.

> I am looking for a webpage script or programme to let users to delete
> their own account. Do anyone have any idea about that? Thank you very
> much.

Do you really want a web interface for solely letting users delete their
account? Why should they do so? Or are you looking for a function to
integrate into an existing web environment?

In either case, simply let the user log in (= check his password), then
issue "vdeluser @domain.tld", e.g. with a system() command or
using the vpopmail API, and done. Don't forget to kick the user out of
the web interface immediately, as he doesn't have any more privileges.

Jonas




[vchkpw] Script for users to delete their own account

2003-08-30 Thread qmail
Dear All, 

I am looking for a webpage script or programme to let users to delete their 
own account. Do anyone have any idea about that? Thank you very much.