El Capitan Mac: /usr/bin/login tries to run /bin/false

Matthew: 02 February 2022

Just upgraded from Yosemite to El Capitan, and I started out with an Emacs problem: it wouldn't launch from the icon, complaining that it couldn't find /bin/false. I tracked this down to the fact was trying to run /usr/bin/login, the default for the "Terminal" app. I can switch "Terminal" to run /bin/bash, but that doesn't solve the problem or similar problems for any other apps that try to run /usr/bin/login.

It looks like I need to fix /usr/bin/login to run /usr/bin/false and not /bin/false, but I have no idea how.

I tried to trick the programs backwards,

sudo ln -s /usr/bin/false /bin/false 

and I get "Operation not permitted." I tried

sudo cp /usr/bin/false /bin/false

and I get "Operation mot permitted."

I'm stuck looking for "the right answer" or for other work arounds.

Sophie: 02 February 2022

I had the same problem, with emacs giving me "Error (use-package): exec-path-from-shell :init: Searching for program: no such file or directory, /bin/false" on startup. However, I noticed that this only happens when running Emacs (installed from emacsformacosx) from the Dock or Spotlight. If I ran it from my Terminal, or by clicking on it in Applications in finder, it worked fine.

After a restart, the problem was resolved. I suspect that Dock and Spotlight held on to my original default shell, and after a restart, they used the new value (changed from /bin/false to /bin/zsh).