BugTracker icon indicating copy to clipboard operation
BugTracker copied to clipboard

Changing shells seems to break the local SSH server

Open m1stadev opened this issue 5 years ago • 2 comments

Tell us about your setup:

  1. What iDevice are you using? iPhone 8 Plus

  2. On what version of iOS is it? iOS 13.3.1

  3. What version of checkra1n are you using? GUI or CLI? GUI

  4. What is your host system (OS version? Hackintosh? VM? etc.)? macOS 10.14.6, on a real MacBook Pro

  5. How are you connecting to the device (USB-A? USB-C? Apple/3rd party cable? Through a USB hub?)? USB-A, direct connection

What are the steps to reproduce the issue?

  1. Modify /etc/master.passwd and change both mentions of /bin/sh to /bin/zsh
  2. Attempt to SSH into your device via localhost

What do you expect, and what is happening instead? I expect to be able to log into my device, but I instead receive an error that my password is incorrect (even when it is).

Does the issue also occur if you enable Safe Mode? Yes, as it’s not affected by any tweak.

Any other info, error logs, screenshots, ...? Would it be possible to port chsh to iOS? I’d love to be able to change shells without needing to manually modify files.

m1stadev avatar Mar 10 '20 11:03 m1stadev

you probably accidentally changed your password to something you dont know by editing the master.passwd file

ghost avatar May 10 '20 17:05 ghost

I can confirm that changing the shell from /bin/sh to /bin/bash, by modifying the /etc/master.passwd entries and regenerating the /etc/passwd file through pwd_mkdb -p /etc/master.passwd, results in the password being marked as incorrect. When changing the shell back to /bin/sh everything works fine, so this is not a case of accidentally messing up the master.passwd file.

m-rots avatar Dec 18 '23 12:12 m-rots