Solved

Creating POP Accounts through CGI

Posted on 1997-11-21
5
133 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Great,

Perl would be fine.

Thanks.
Sacha
0
 
LVL 2

Expert Comment

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

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
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…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

772 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

12 Experts available now in Live!

Get 1:1 Help Now