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
Solved

Creating POP Accounts through CGI

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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.

856 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