# set password expiry date to every 2 months



## thomaslam12 (Oct 11, 2013)

Please teach me how to set the password expiry time to every 2 months on an user account.


----------



## SirDice (Oct 11, 2013)

`pw usermod dice -p 62`

See pw(8).


----------



## thomaslam12 (Oct 11, 2013)

I have tried this. After I run the command, I use that account to login. The system ask me to change it immediately. 

PS: in the master.passwd file, the change field of the account is changed from 62 to 0 after I change the password. It seems that the command is not forcing the user to change the password every 2 months.


----------



## SirDice (Oct 11, 2013)

In that case you will need to set passwordtime in /etc/login.conf.


----------

