creating new user account password.

Fbsd8 fbsd8 at a1poweruser.com
Wed Jan 23 22:40:38 UTC 2013


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.





More information about the freebsd-questions mailing list