Terminal Failing to login

Suddenly, when I attempted to create a new terminal window, it fails. It does nothing for about a minute then shows only this:

Login incorrect
login:

Typing in my username doesn't work. I get the same message. Terminal was already up and running in another window. I just can't create any more.

My editor, IntelliJ, has a built in terminal and that's running fine.


Solution 1:

This has happened to me in the past and just happened again on a Mac running High Sierra (10.13.5) that is bound to an Active Directory domain.

Turns out it was caused by an active Cisco IPSec VPN connection. The VPN connection likely hijacked my DNS settings and broke local name resolution that relied on using the AD server's DNS.

It also broke access to the Users & Groups System Preference panel.

Try disconnecting your VPN and reopening Terminal.

Solution 2:

I had a similar issue; the computer had been attached to Active Directory and the account had been disabled. I went ahead and disabled Active Directory by going into System Preferences > Users & Groups > unlocking the system to make changes and select Network Account Server: and just deleted the Active Directory account.

Solution 3:

Just a hunch: you might have too many pty's open (pseudo-teletype).

Happened to me while using Xcode, which apparently opened up too many terminal sessions in the background and prevented me from opening a new one.

If this happens again, you could try

  sudo sysctl -w kern.tty.ptmx_max=255