how to enforce password change at first login

Yuri Pankov yuri.pankov at
Wed Mar 30 05:19:47 UTC 2011

On Wed, Mar 30, 2011 at 06:10:11AM +0100, Michael wrote:
> Hi,
> How can I enforce a user to change his password at first login?
> I want to set up ssh access for my friends but I don't want to know 
> their passwords. And I don't trust they will change it just because I've 
> asked to do so.
> I was thinking I can create account with random password and provide it 
> to my users. Then the system would enforce password change at first login.
> Any clues, please?

Something like:
# pw usermod <username> -p -1

Anyway, see pw(8).


More information about the freebsd-questions mailing list