How to set Password Change Time in FreeBSD

Jun Li BJ Zhao zhaojli at cn.ibm.com
Thu Apr 12 09:25:51 UTC 2012


Dears,
To force local user in FreeBSD system changing their password periodically,
I want to set Password Change Time. I tried the following two ways, but
both failed. Could you please give me the correct operations? Thanks a lot!

Method 1:
Added passwordtime=2m to /etc/login.conf, then run the command
cap_mkdb /etc/login.conf.
Result: password of any user was not expired after two minutes.

Method 2:
Run the command pw usermod root -p 2m
Result: password of root was expired after two minutes. But after I changed
it one time, it would be never expired again.

My system info:
7.3-RELEASE

Best Regards,
Jun Li Zhao (赵俊丽)
Smart Business Desktop on IBM Cloud, IBM China Development Lab(CDL)
Email: zhaojli at cn.ibm.com    Phone: +8610-82452120
Address: Diamond B Bldg. #19 Building, Zhong Guan Cun Software Park, #8
Dong Bei Wang West Road, ShangDi, Haidian District, Beijing,
P.R.China,100193


More information about the freebsd-questions mailing list