How to lock the account after consecutive unsuccessful login

Dears,

I want to lock the user's account after consecutive unsuccessful login attempts, how can I do this ?

Quote from:
Solaris Security Recommendations - Genunix

"In /etc/default/login define RETRIES=3; this defines a global limit which, when locking is enabled, will lock accounts after exceeding this count. "