1. jo99ix's Avatar
    I have iphone 3G, firmware 2.2.

    So this is what I have done so far:

    - 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?

    Any help is appreciated!
    2009-04-29 07:20 AM
  2. tatum's Avatar
    Can you get to a command line prompt in MobileTerminal?

    It sounds like you may have mucked up the permissions and/or ownership of the passwd file by copying it back and forth from Windows.

    If you can't get a prompt, you will probably have to restore.
    2009-04-29 04:30 PM
  3. jo99ix's Avatar
    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.
    2009-04-29 07:39 PM
  4. jo99ix's Avatar
    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.
    2009-05-06 04:08 AM
  5. tatum's Avatar
    Glad you got it fixed!

    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.
    2009-05-08 06:59 AM
  6. alek's Avatar
    sounds like u didnt set permissions...
    2009-05-09 09:04 AM
LINK TO POST COPIED TO CLIPBOARD