From owner-freebsd-questions Sun Apr 6 08:21:19 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id IAA00713 for questions-outgoing; Sun, 6 Apr 1997 08:21:19 -0700 (PDT) Received: from cisco.it ([194.183.8.2]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA00689 for ; Sun, 6 Apr 1997 08:21:11 -0700 (PDT) Received: from pentium-120 (ppp-03.cisco.it [194.183.8.32]) by cisco.it (8.7.5/8.7.3) with SMTP id SAA04140; Sun, 6 Apr 1997 18:20:17 +0200 (MET DST) Date: Sun, 6 Apr 1997 18:20:17 +0200 (MET DST) Message-Id: <199704061620.SAA04140@cisco.it> X-Sender: cp011@posta.cisco.it X-Mailer: Windows Eudora Light Version 1.5.2 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Dan Busarow From: Antonio Nati Subject: Re: adduser using a cgi-bin Cc: freebsd-questions@FreeBSD.ORG Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Which http server are you running? Are you sure it runs as root >and doesn't revert to a non-priviledged user? Are you sure you >want an http server running as root? > I'm running Apache, and the user if *effectively* nobody. I've tried to chmod 4555 the cgi program, with no success (same result). I've tried a new code (copied from passwd for popper), that I run both as cgi and as interactive program: setuid (0); create a channel on a pty device, fork, child --> exec (adduser....) master --> printf (messages from child) result: perl adduser procedure hangs after the first line (copyright of the writer) with or without the chmod 4555 on the program. An interactive program doing system (adduser...) instead works correctly. It looks like adduser hangs if is not working on a terminal. Any suggestion? I may send my development environment (as attachment .tar) to who is interested at the question. Tonino