Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Creating POP Accounts through CGI

Posted on 1997-11-21
5
Medium Priority
?
145 Views
Last Modified: 2013-12-25
I was wondering what the easiest way would be to create a web based interface to create POP accounts, I have tried to find similiar things done on the net, but have not found anything. Does anyone know of a program or has done something similar ?
0
Comment
Question by:sach
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:df020797
ID: 1831319
Hmmm to be able to let a CGI program create a POP account you gonna need it to execute as root in some way (NOT GOOD!!!)or manipulate the systemfiles to be bale to be accesses and altered by the WWW server user (NOT GOOD!!!). So its not a good idea to write a WWW interface for mail/pop server out of a security point of view.

To actually write a script is quite simple...

A form where you fill out needed data for the passwd file and the shadow file. Then pass it on to a program that calls useradd with the right swicthes and the data supplied by the form. The trick then is then to either let the WWW server excute as root or  let the WWW server user be able to alter passwd file and other mailserver dependent files.

Although I STRONGLY recomend to not use a WWW interface for the mailserver administration.
0
 

Author Comment

by:sach
ID: 1831320
Thanks, I knew the security issue is not an ideal one. This could be fixed by creating secondary passwd and shadow files which are updated every 60 minutes by the cron...

The main problem I have is the passwd file encryption the server uses, how do I simulate this and assign a password, the passwd command does not except parameters.

The ideal would be to write directly to passwd (Or passwd2) file.

Thanks again.
Sacha
0
 
LVL 2

Accepted Solution

by:
df020797 earned 150 total points
ID: 1831321
The passwd encryption is the easiset thing :)
For an example Perl supports 3DES Unix encrypotion (i.e. the std method used to encrypt passwords). If you like I can send you a Perl sub I have written for password encryption. What language do you program the CGI:s in? Cuz... the normal Unix passwd encryption is supported in almost all languages used on Unix.

0
 

Author Comment

by:sach
ID: 1831322
Great,

Perl would be fine.

Thanks.
Sacha
0
 
LVL 2

Expert Comment

by:df020797
ID: 1831323
Mail me at df@darkface.pp.se and I ll mail the sub to you :)

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question