- Installed openSSH to phone
- Used WinSCP to access phone on a Windows XP machine
- I changed the root password in file /etc/master.passwd, using Notepad, and uploaded the file back to iphone
- I could no longer SSH or use MobileTerminal with my phone
- Later that day I found a third party application that allowed me to access my root folders without the correct root password
- I changed /etc/master.passwd to the original state, using Notpad, and uploaded the file back to iphone
- I still cannot SSH or MobileTerminal to my phone
Error when SSH is access denied. I tried all variations of alpine, dottie, or my own that I used earlier today. No luck.
Error message in MobileTerminal is:
login: /bin/sh\r: No such file or directory
I can use my phone as usual, download more apps, use iTune just normally. I just cannot SSH or MobileTerminal. What should I do? Will a restore help? Is there anything else I could try before resorting to restore?
I could not get to a command prompt in MobileTerminal, was not able to log in as root.
The 3rd party application I found actually allows me to access the root folder and change permission/ownership of files. I was able to upload back the original master.passwd. Could you tell me what permission/ownership settings I should check? I checked this file with some other ones, as far as I can tell they have the same permission/ownership.
Thank you all for replying and offering tips. I did eventually resolve the problem, here is how:
I copied an original master.passwd file off of someone else's iphone 3G, firmware 2.2 or newer
Using a 3rd party software, I was able to get into my iphone directory and place this original file to my phone
Turn off and on, it worked
I edited my master.passwd using Notepad in Windows XP. Like Ezekeel guessed, even though I tried to restore the file to its original content, after saving it apparently contained some extra stuff that messed up my root/mobile password. I had to use a fresh copy of someone else's master.passwd to restore my access. This is essentially the same as restoring my phone, when the only file I need restoring is master.passwd.
For future reference, it is not always a good idea to modify non-windows files with Windows apps. Sometimes you can get extra line breaks or control characters that will corrupt the file when the native OS tries to read it again. That is what it sounds like happened in your case.