From owner-freebsd-questions Thu Mar 29 22:19: 3 2001 Delivered-To: freebsd-questions@freebsd.org Received: from luke.cpl.net (luke.cpl.net [63.169.72.3]) by hub.freebsd.org (Postfix) with ESMTP id 42EF037B718 for ; Thu, 29 Mar 2001 22:19:01 -0800 (PST) (envelope-from shawn@megadeth.org) Received: from shawn (shawn.megadeth.org [63.169.72.254]) by luke.cpl.net (8.9.3/8.9.3) with SMTP id WAA85418; Thu, 29 Mar 2001 22:17:52 -0800 (PST) Message-ID: <01eb01c0b8e0$e29b7d80$fe48a93f@shawn> From: "Shawn Ramsey" To: , References: <27396d277a9b.277a9b27396d@mbox.com.au> Subject: Re: Adding Users with a shell script Date: Thu, 29 Mar 2001 22:15:56 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Hiya all, > > I need to be able to add users to be FreeBSD box via a shell script. On > Linux this was a simple affair as I could have something like: > > adduser -G pop3 -s /bin/false -p secret joe > > This would add the user joe to the system with the next available UID, > no login shell, add him to the pop3 group and set his password to "secret". > > How do I do this on FreeBSD as the "adduser" utility on FreeBSD insists > on being completly interactive even in "silent" mode (-s) and even when > I pass all my options to it via the command line switches. Have you looked at "pw" ? It is completly non-interactive, and pretty much anything parameter can be passed to it. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message