Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2002 00:20:05 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        ro0t <root@unixhideout.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Script needed? Is it possible, safe? any alternatives or suggestions?
Message-ID:  <20020702212004.GA14865@hades.hell.gr>
In-Reply-To: <CGEIKJFNGMJHCMFBJGJFCEJFCAAA.root@unixhideout.com>
References:  <CGEIKJFNGMJHCMFBJGJFCEJFCAAA.root@unixhideout.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020702212004.GA14865>