From owner-freebsd-questions Fri Dec 28 7:16:45 2001 Delivered-To: freebsd-questions@freebsd.org Received: from tomts9-srv.bellnexxia.net (tomts9.bellnexxia.net [209.226.175.53]) by hub.freebsd.org (Postfix) with ESMTP id DF5D037B430 for ; Fri, 28 Dec 2001 07:16:42 -0800 (PST) Received: from scaryg.shacknet.nu ([64.231.132.74]) by tomts9-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20011228151642.CQEU3274.tomts9-srv.bellnexxia.net@scaryg.shacknet.nu> for ; Fri, 28 Dec 2001 10:16:42 -0500 Received: from localhost ([::1] helo=scaryg.shacknet.nu) by scaryg.shacknet.nu with smtp (Exim 3.33 #1) id 16JyiU-0003En-00 for freebsd-questions@freebsd.org; Fri, 28 Dec 2001 10:14:38 -0500 Date: Fri, 28 Dec 2001 10:14:38 -0500 From: ScaryG To: FreeBSD Questions Subject: adduser in a perl script question Message-Id: <20011228101438.187f0eb0.freymann@scaryg.shacknet.nu> X-Mailer: Sylpheed version 0.6.5 (GTK+ 1.2.10; i386--freebsd4.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Hi Gang. I'm trying to automate the creation of a new user in a perl5 script. The following does not work: $error = `/usr/sbin/adduser -shell $shell -fullname $name -password $password -username $username -home /home/$name`; This runs as root and the variables are populated in advance. I've read the man(8) page for adduser but it's not helping. I need to set the password which is why I'm not using pw. The man pages for pw talk about a pipe for the password but there are no examples. I'm hoping somebody else out there can toss me a pointer or two to make this work? Thanks in advance... gf To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message