password expire
Tobias Fendin
tobias.fendin at telia.com
Fri Jul 22 01:24:25 GMT 2005
Gayn Winters wrote:
>
>>-----Original Message-----
>>From: owner-freebsd-questions at freebsd.org
>>[mailto:owner-freebsd-questions at freebsd.org] On Behalf Of
>>Tobias Fendin
>>Sent: Thursday, July 21, 2005 11:31 AM
>>To: Joe Stuart
>>Cc: freebsd-questions at 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 <your group> |awk -F ":" '{print $4}'| sed
's/,/ /1'`
do
pw usermod $USER -p <date>
done
-Tobias
More information about the freebsd-questions
mailing list