Limit login attempts (how do I do it)

Micheal Patterson micheal at
Thu Sep 25 07:12:21 PDT 2003

----- Original Message ----- 
From: "Bob Collins" <freebsd at>
To: "FreeBSD" <freebsd-questions at>
Sent: Wednesday, September 24, 2003 4:11 PM
Subject: Limit login attempts (how do I do it)

> A NB question here.
> I am trying to limit the number of allowed login attempts against my
> FreeBSD box. I cannot find anything for a limit to this other than;
> login-retries=x in the /etc/login.conf. This does not seem to work with
> Release, which is what I am running.
> A nudge to the FM or Man Pages would be helpful.
> Thanks
> Bob

To anyone else looking for this, here's how to change these settings.
They're defined in login.c:

#define TTYGRPNAME      "tty"           /* name of group to own ttys */
#define DEFAULT_PROMPT          "login: "
#define DEFAULT_PASSWD_PROMPT   "Password:"

Unless there's another way to do this, change those variables as desired and
recompile login.


Micheal Patterson
TSG Network Administration

Confidentiality Notice:  This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original

More information about the freebsd-questions mailing list