From owner-freebsd-questions Mon Feb 24 6:58: 3 2003 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 E820437B401 for ; Mon, 24 Feb 2003 06:58:01 -0800 (PST) Received: from malkav.snowmoon.com (malkav.snowmoon.com [209.23.60.62]) by mx1.FreeBSD.org (Postfix) with SMTP id 2057143FDD for ; Mon, 24 Feb 2003 06:58:01 -0800 (PST) (envelope-from jaime@snowmoon.com) Received: (qmail 75390 invoked from network); 24 Feb 2003 14:58:00 -0000 Received: from localhost.snowmoon.com (HELO localhost) (127.0.0.1) by localhost.snowmoon.com with SMTP; 24 Feb 2003 14:58:00 -0000 Date: Mon, 24 Feb 2003 09:58:00 -0500 (EST) From: Jaime To: default013 Cc: FreeBSD-Questions Subject: Re: add user with shell account In-Reply-To: Message-ID: <20030224095451.P74573-100000@malkav.snowmoon.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Mon, 24 Feb 2003, default013 wrote: > I'm working on a script that will automate making shell accounts and I guess > I'm a bit stumped on how one enters the encrypted password into the deal. > > If anyone knows any resources where I might find this kind of info or has > some suggestions for me it would be very much appreciated. If you don't mind learning a new language, check out Expect. Its an extention to TCL that allows the language to script/automate command line programs such as the adduser command. Alternately, look at man 8 pw and /usr/share/skel. These should get you started. Once upon a time, I took the adduser script that came with FreeBSD and was written in perl (in C now) and hacked it to do what I wanted. You could take that approach, too. Good luck, Jaime -- "To affect the quality of the day, that is the highest of arts." - Henry David Thoreau, _Where_I_Live_ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message