Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jan 2013 17:36:20 -0500
From:      Fbsd8 <fbsd8@a1poweruser.com>
To:        Matthew Seaman <matthew@FreeBSD.org>
Cc:        glarkin@FreeBSD.org, freebsd-questions@freebsd.org
Subject:   Re: creating new user account password.
Message-ID:  <510065E4.4070200@a1poweruser.com>
In-Reply-To: <51004729.6080809@FreeBSD.org>
References:  <510042DC.6000406@a1poweruser.com> <51004729.6080809@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?510065E4.4070200>