From owner-freebsd-questions@FreeBSD.ORG Tue Jan 22 07:40:10 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ACAA16A41B for ; Tue, 22 Jan 2008 07:40:10 +0000 (UTC) (envelope-from on@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) by mx1.freebsd.org (Postfix) with ESMTP id B6E9213C47E for ; Tue, 22 Jan 2008 07:40:09 +0000 (UTC) (envelope-from on@cs.ait.ac.th) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) by mail.cs.ait.ac.th (8.13.1/8.12.11) with ESMTP id m0M7e8IK001618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Jan 2008 14:40:08 +0700 (ICT) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.13.6/8.12.11) id m0M7e73W049416; Tue, 22 Jan 2008 14:40:07 +0700 (ICT) Date: Tue, 22 Jan 2008 14:40:07 +0700 (ICT) Message-Id: <200801220740.m0M7e73W049416@banyan.cs.ait.ac.th> From: Olivier Nicole To: teklimbu@wlink.com.np In-reply-to: <47959B51.8030405@wlink.com.np> (message from Tek Bahadur Limbu on Tue, 22 Jan 2008 13:14:21 +0545) References: <47958F26.3030704@wlink.com.np> <200801220717.m0M7HLjR049208@banyan.cs.ait.ac.th> <47959B51.8030405@wlink.com.np> X-Virus-Scanned: on CSIM by amavisd-milter (http://www.amavis.org/) Cc: questions@freebsd.org Subject: Re: Need to re-generate the passwords in /etc/passwd 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: Tue, 22 Jan 2008 07:40:10 -0000 > How do I use the above script for my machine which I access remotely by SSH. Yuck. I could email you a list of 1000 random strings? > > I could send it to you as Perl script, so you could generate 500 > > passwords in one run, or you call the web page enough number of times. > > That will be great! So I just run the script against /etc/passwd and > presto, all the users in that file will be generated new passwords. > > I will need a way to pass the newly generated passwords to individuals > users. No, the script only generates random strings, you would have to apply these strings to the accounts. The idea would be to make a file with a list of user name and new password, then use this file to feed to a script that force the new password. You have to keep that file in clear text, there is no way you can retreive the new opassword after you have applied it to a user account. Bests, Olivier