From owner-freebsd-questions@FreeBSD.ORG Wed Apr 4 13:44:05 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4F7F16A402 for ; Wed, 4 Apr 2007 13:44:05 +0000 (UTC) (envelope-from agus.262@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 61BD113C44B for ; Wed, 4 Apr 2007 13:44:05 +0000 (UTC) (envelope-from agus.262@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so237922ana for ; Wed, 04 Apr 2007 06:44:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Gs3vmlwKxnNTnI//3cNk5Z6BeLQomQF2DVRhyCEANb5mFwc2hf+oTVYFiaBvUzJXTuWxaacXiJE2g97fvHXqi/pdxoqFzKxELWIsiavkA3QLVomb4eB/CfgriyLTjWaeB3tPBKTUgv8TTHCma3AF7gesmn1otnSlf+kxVMZMpq4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=C7++Ed37A/fz8DOyLkmnv/QAAIZf+yGVBuULyD2sbh3C9bYh4BkfgbmN8Y9Cl2TWUdJh+xGsbtDHaesgizNjFIdZ/I5N/yC3xgqKhOOozAeD8ZV+Z36eV2rS9wLCuO4C5xSJ25z5Ss7epJlNEgP/PQLeSw80fJ5BTiT3tRBjnF0= Received: by 10.100.8.18 with SMTP id 18mr414215anh.1175694243898; Wed, 04 Apr 2007 06:44:03 -0700 (PDT) Received: by 10.100.106.3 with HTTP; Wed, 4 Apr 2007 06:44:03 -0700 (PDT) Message-ID: Date: Wed, 4 Apr 2007 10:44:03 -0300 From: Agus To: "Kevin Kinsey" In-Reply-To: <4612F4BA.3030704@daleco.biz> MIME-Version: 1.0 References: <4612E800.3010408@daleco.biz> <4612F4BA.3030704@daleco.biz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions Subject: Re: Non Interactive passwd change via script.... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2007 13:44:05 -0000 2007/4/3, Kevin Kinsey : > > Agus wrote: > >>> Hi everybody.... > >>> its been a few days now, since im trying to do a tcsh script to > automatize > >>> the process of creating users in my system.... > >>> Users register via web, and info is saved in a MySQL DB and in a > >>> file. the > >>> script reads from the file and begins adding users with pw. > >>> but im stuck on how to create the password for the users. the > >>> only solution > >>> that worked was the use of expect, but it consumes a lot of resources > >>> (7.8%System). Now that isnt a problem cause the users are few. but if > >>> it has to > >>> add a lot of users?? it will kill my server.... > >>> > >>> any hints will be apreciated..... > > > >> pw(8) ?? > > > > I cant find the way to do it with pw.... > > > > thanks.... > > Please keep the list in the TO: or CC: field on your > replies ... thanks! > > Works fine here as described in pw(8): > > [root@archangel][~] > $ id test > id: test: no such user > > [root@archangel][~] > $ pw useradd -n test > > [root@archangel][~] > $ id test > uid=1020(test) gid=1026(test) groups=1026(test) > > [root@archangel][~] > $ finger test > Login: test Name: User Test > Directory: /home/test Shell: /bin/sh > Never logged in. > No Mail. > No Plan. > > HTH, > > Kevin Kinsey > -- > It took me fifteen years to discover that I had no talent for writing, > but I couldn't give it up because by that time I was too famous. > -- Robert Benchley > OK..thanks for the heads up about responding.... The problem isnt adding the user....i ve done that......the problem is creating the password for the user as i tried to say in the first email... thanks kevin,