Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jan 2013 20:25:13 +0000
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: creating new user account password.
Message-ID:  <51004729.6080809@FreeBSD.org>
In-Reply-To: <510042DC.6000406@a1poweruser.com>
References:  <510042DC.6000406@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
------enig2SBLHVXTHSQESLMEMXVMN
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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 accou=
nt.

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 thou=
gh.

	Cheers,

	Matthew

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



------enig2SBLHVXTHSQESLMEMXVMN
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlEARzAACgkQ8Mjk52CukIxF6ACeOsFfnSgm69oiRW3lCN9EsHPh
osEAnjGKU7EWQW73lhf0mbX7/iYrBXn7
=z20C
-----END PGP SIGNATURE-----

------enig2SBLHVXTHSQESLMEMXVMN--



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