From owner-freebsd-questions Tue Jul 2 14:23:43 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 849D237B7B4 for ; Tue, 2 Jul 2002 14:20:18 -0700 (PDT) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id C463D43E13 for ; Tue, 2 Jul 2002 14:20:13 -0700 (PDT) (envelope-from keramida@ceid.upatras.gr) Received: from shadow.otenet.gr (shadow.otenet.gr [195.170.0.7]) by mailsrv.otenet.gr (8.12.4/8.12.4) with ESMTP id g62LKCu2020128; Wed, 3 Jul 2002 00:20:12 +0300 (EEST) Received: from hades.hell.gr (patr530-b131.otenet.gr [212.205.244.139]) by shadow.otenet.gr (8.12.4/8.12.4) with ESMTP id g62LK9Js023234; Wed, 3 Jul 2002 00:20:11 +0300 (EEST) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.4/8.12.4) with ESMTP id g62LK8XU016091; Wed, 3 Jul 2002 00:20:08 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from charon@localhost) by hades.hell.gr (8.12.4/8.12.4/Submit) id g62LK7fU016090; Wed, 3 Jul 2002 00:20:07 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Wed, 3 Jul 2002 00:20:05 +0300 From: Giorgos Keramidas To: ro0t Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Script needed? Is it possible, safe? any alternatives or suggestions? Message-ID: <20020702212004.GA14865@hades.hell.gr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 5.0-CURRENT i386 X-PGP-Fingerprint: C1EB 0653 DB8B A557 3829 00F9 D60F 941A 3186 03B6 X-Phone: +30-944-116520 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-07-02 16:17 +0000, ro0t wrote: > I have run free email addresses on my FreeBSD web server for over > two years now. It's getting very hard to add all these users > manually. I would like a way for them to hit my webpage, request an > email, sign the "i agree form" (heres the part im stumped on) =-> > And then hit some type of script that will take the user input (user > and pass) and add them to the system using the defaults in > adduser.conf no shell, home directory is accessible only by the > process the web server runs as but not through www itself, etc. » The offline way. Make a PHP script that writes username/pass/other information to a file that you periodically check, while logged in as root, and pipe to a program that uses pw(8) to do the necessary useradd/groupadd. » The online way. Make the PHP script contact a privileged program that runs and listens to a local port. The PHP script verifies all the user information, and then connect()'s to the useradd-server process. The useradd-server reads username/pass pairs and any other pieces of information it needs from the network connection to the PHP script and forks pw(8) copies to do the grunt work. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message