From owner-freebsd-questions@FreeBSD.ORG Wed Jan 23 22:40:38 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 46D55B89; Wed, 23 Jan 2013 22:40:38 +0000 (UTC) (envelope-from fbsd8@a1poweruser.com) Received: from mail-03.name-services.com (mail-03.name-services.com [69.64.155.195]) by mx1.freebsd.org (Postfix) with ESMTP id 06908662; Wed, 23 Jan 2013 22:40:25 +0000 (UTC) Received: from [10.0.10.3] ([173.88.197.103]) by mail-03.name-services.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 23 Jan 2013 14:37:40 -0800 Message-ID: <510065E4.4070200@a1poweruser.com> Date: Wed, 23 Jan 2013 17:36:20 -0500 From: Fbsd8 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Matthew Seaman Subject: Re: creating new user account password. References: <510042DC.6000406@a1poweruser.com> <51004729.6080809@FreeBSD.org> In-Reply-To: <51004729.6080809@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Jan 2013 22:37:46.0733 (UTC) FILETIME=[443771D0:01CDF9BA] X-Sender: fbsd8@a1poweruser.com X-Authenticated-Sender: fbsd8@a1poweruser.com X-EchoSenderHash: [fbsd8]-[a1poweruser*com] Cc: glarkin@FreeBSD.org, freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2013 22:40:38 -0000 Matthew Seaman wrote: > On 23/01/2013 20:06, Fbsd8 wrote: >> I know I can create a new user account having a password same as the >> user name. After logging in the first time using the user account name >> as the password, I want to force the user to create a new password. >> Is there a way to do that? > > You can set the password to expire virtually immediately: > > pw usermod -n username -p +1m > > or add the '-p +1m' bit to the 'pw useradd' line used to create the account. > > I believe this will mean the user is required to set a new password on > login after the password has expired. Might be an idea to test that though. > > Cheers, > > Matthew > Thank you both, Matthew and Greg I added -p 12-12-12 as a date in the past day 12 month 12 year 12. I tested and right after entering the account name pw I was asked for a new password. That is what I wanted. Matthew gave me the -p option to use on the pw adduser command and Greg gave me the clue to use a date in the past.