From owner-freebsd-questions@FreeBSD.ORG Fri Jul 22 01:24:25 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 0A2D816A422 for ; Fri, 22 Jul 2005 01:24:25 +0000 (GMT) (envelope-from tobias.fendin@telia.com) Received: from pne-smtpout1-sn1.fre.skanova.net (pne-smtpout1-sn1.fre.skanova.net [81.228.11.98]) by mx1.FreeBSD.org (Postfix) with ESMTP id A84D843D5F for ; Fri, 22 Jul 2005 01:24:14 +0000 (GMT) (envelope-from tobias.fendin@telia.com) Received: from [192.168.1.6] (81.229.46.22) by pne-smtpout1-sn1.fre.skanova.net (7.2.060.1) (authenticated as u18317830) id 42B813B0004FE8F6 for freebsd-questions@freebsd.org; Fri, 22 Jul 2005 03:24:13 +0200 Message-ID: <42E04AB6.9000501@telia.com> Date: Fri, 22 Jul 2005 03:24:06 +0200 From: Tobias Fendin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050403) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <005d01c58e3d$0ff71f10$c901a8c0@workdog> In-Reply-To: <005d01c58e3d$0ff71f10$c901a8c0@workdog> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: password expire 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: Fri, 22 Jul 2005 01:24:25 -0000 Gayn Winters wrote: > >>-----Original Message----- >>From: owner-freebsd-questions@freebsd.org >>[mailto:owner-freebsd-questions@freebsd.org] On Behalf Of >>Tobias Fendin >>Sent: Thursday, July 21, 2005 11:31 AM >>To: Joe Stuart >>Cc: freebsd-questions@freebsd.org >>Subject: Re: password expire >> >> >>Joe Stuart wrote: >> >>>I have a whole group of users with weak passwords. Is there >> >>a way that I can force a password change at next login? >> >> >>"pw usermod [name|uid] -p date" should do the trick. >>Check the pw(8) man-page for more details. >> >> -Tobias > > > OK, but if a "whole group" is many many users, how can one pipe-in the > list of users? I have a similar problem updating one of my user groups, > and typing in a pw for each user is a little painful. Maybe one of the > shell wizards out there can give us a lesson. TIA, > > -gayn > > > well, this might not be nice, but hey, it's a hack :) for USER in `pw groupshow |awk -F ":" '{print $4}'| sed 's/,/ /1'` do pw usermod $USER -p done -Tobias