RE: [vchkpw] Script for users to delete their own account
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
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
- 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
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
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
- 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
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
- 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
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