Solved

Creating POP Accounts through CGI

Posted on 1997-11-21
5
139 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
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.

726 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