By default when I login to my Arch linux box in a tty, there is a timeout after I type my username but before I type my password.

So it goes like this

Login:  mylogin <enter>
(+ 60 seconds)

As you can see, if I don't type the password it recycles the prompt -- I want it to wait indefinitely for my password instead of recycling the login prompt.

Is this possible?

It seems like the --timeout option to agetty would be what I want. However, I tried adding this flag in the getty files in /usr/lib/systemd/system/ (the option is not used by default), and rebooting -- it seemed to have no effect.


agetty calls login after reading in the user name, so any timeout when reading the password is done by login.

To change this, edit /etc/login.defs and change the LOGIN_TIMEOUT value.

# Max time in seconds for login
  • 1
    How would you get it to last infinitely? – Theoremiser Jan 26 '17 at 19:19
  • 2
    @AnEpicPerson It's not documented, as far as I can see, but looking through the code there is #define ALARM 60 and timeout = getdef_unum ("LOGIN_TIMEOUT", ALARM); if (timeout > 0) { (void) alarm (timeout); }. So putting LOGIN_TIMEOUT 0 in login.defs ought to disable any timeout. – Mark Plotnick Jan 26 '17 at 19:35
  1. In Arch, programs install defaults to /usr/lib. You should not be manually messing around in there (almost ever); definitely not with systemd. systemd provides overriding of default units for a reason (see the "Unit Load Path" section).

  2. Part of this is a security issue. The timeout checks back for negligence (e.g., you type your whole password, but forget to press enter and are distracted by something). You should be aware that disabling it is not the most secure decision here.

  3. When you edit or override a unit, you need to run systemctl daemon-reload in order for systemd to fully recognize the change. After creating the new unit in /etc/systemd/, you must daemon-reload and then disable the default unit and enable your new unit. Then, rebooting should yield the results you want. (Note: I advise against doing so though; see point 2.)

  • 1
    Regarding your point 2. -- the practical import of doing this is so my 4-year old can manage to type in her 9-letter password before being thwarted. Re your answer in its entirety, please find it in your heart to give me a solution to my question. – g33kz0r Jul 14 '14 at 0:34
  • I had thought you were actually on the right track with the --timeout option, but looking further into it (namely, agetty's man page), it seems the --timeout option refers to the entering of the username, not the password. – HalosGhost Jul 14 '14 at 0:48
  • @HalosGhost No need to put '$' before commands when editing posts, it is wasteful, and that makes the more difficult to cut and paste. Only do when commands and output are intermixed in one block – Zelda Jul 18 '14 at 8:26
  • 1
    @Zelda, I'm not actually sure why you posted that here. But, I'll keep that in mind. – HalosGhost Jul 18 '14 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.