creating new user account password.

Matthew Seaman matthew at FreeBSD.org
Wed Jan 23 20:25:28 UTC 2013


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

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 268 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20130123/23460dd5/attachment.sig>


More information about the freebsd-questions mailing list