4

Problem: After updating iTerm2 to version 3.3.6, I started getting the following message whenever opening iTerm2 or opening a new tab in iTerm2.

Login incorrect
login:

I could then login and use the iTerm as normal, but would get the same message and prompt whenever opening a new tab.

Workaround: If I go to Preferences > Profiles and change the Working Directory setting from "Home directory" to "Directory:", then enter the path to my home directory, this fixes the problem.

Question: I'm trying to understand and fix the underlying problem. Given the above workaround, it seems that iTerm2 thinks my home directory is somewhere else. Any ideas?

Extra details: I'm running MacOS 10.14.5. My username and home directory contains a space. Someone suggested that this might be part of the problem, but if the space is causing a problem, that doesn't explain why it only became an issue after updating iTerm.

5
  • 1
    I'm running High Sierra and iTerm 3.3.6 and I cannot reproduce your problem. It works fine on my machine. Do you have something strange in your .bash_profile file.
    – Natsfan
    Oct 11, 2019 at 17:16
  • Thanks. I tried deleting my .bash_profile and .bashrc files from my home directory, and the problem persisted. Does your home directory contain a space?
    – srcerer
    Oct 11, 2019 at 17:37
  • no, my home directory does not contain a space.
    – Natsfan
    Oct 11, 2019 at 17:40
  • 1
    I'm seeing this issue now and my home directory does happen to contain an apostrophe - ' . (not recommended btw)
    – ryryguy
    Nov 7, 2019 at 22:39
  • Does the workaround work for you? I'm trying to decide if I should post it as the answer.
    – srcerer
    Nov 8, 2019 at 13:19

4 Answers 4

3

(Given the age of this question, I'm mostly posting this for others like me that have different circumstances but the same error message.)

I had that same error after my employer changed my username, but migrated all my files to the home directory of the new user. Of course that didn't correct any path references in my files.

I had to hunt through the com.googlecode.iterm2.plist config file for references to my old username. In doing so I found that there was a line containing login -fp "old_username". Changing this to login -fp "new_username" fixed the issue for me. I suspect the quoting for that command is wrong with your username that contains a space.

1

Go to Preferences > Profiles and change the Working Directory setting from "Home directory" to "Directory:", then enter the path to your home directory. If your home directory contains spaces or special characters, this might fix the problem.

However, this doesn't explain the underlying cause of the problem, and is not an ideal solution. I'm posting this as the answer since it has worked for at least two people.

0

My fix: I had the same issue with iTerm2 v3.3.12. My fix was to quit and restart iterm2. I had tmux up and running so I did not lose any of my sessions. - E

0

I had the same problem, and it bothered me for a long time, and seeing the login -fp mentioned above gave me a hint:

  1. I checked the com.googlecode.iterm2.plist file and found this paragraph to configure the window arrangement function.

  2. I deleted the original window arrangement and recreated it.

Problem solved.

1
  • 1
    What paragraph? plist files are xml and don't have paragraphs and what has window arrangement to do with the problem?
    – mmmmmm
    Jun 15 at 10:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .