Solved

Creating POP Accounts through CGI

Posted on 1997-11-21
5
134 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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to count occurrences of each item in an array.

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now