How to Change Root Password to Secure Your iPhone

As reported earlier that a hacker successfully breaks into jailbroken iPhones with SSH installed/enabled.

What the hacker did is he scanned all those Jailbroken iPhones with SSH enabled and Default root password. Using that password he then sent a message to the hacked iPhones.

If you have jailbreak your iPhone and want to secure yourself from such infiltration, only thing you need to do is that enable SSH only when needed and make sure you change the root password used to SSH into iPhone.

Change Root Password of Your iPhone

In this iPhone guide you will learn how to change root password of your jailbroken iPhone or iTouch. Install the MobileTerminal. If you don’t have MobileTerminal installed in your iPhone then:

Open the Cydia and go to Search Tab. Search for MobileTerminal.

Tap the MobileTerminal from the search results.
Tap the Install button at the top-right

change-iphone-root-password-1change-iphone-root-password-2

Now tap the confirm button at the top-right.
Once you’re done with the installation, press the big Return to Cydia button.

change-iphone-root-password-3change-iphone-root-password-4

Now press the Home button to close the Cydia and open the MobileTerminal from your iPhone SpringBoard.

change-iphone-root-password-5change-iphone-root-password-6

type su and press return key at the bottom-right.
Now input alpine as your password and press return key.

change-iphone-root-password-7change-iphone-root-password-8

Once the password is entered correctly, you’ll be logged in as root user.
Now input passwd and press return key

change-iphone-root-password-9

You will be prompted to input a new password for root. Input your desired new password and press return.

change-iphone-root-password-10

you’ll be asked to retype your new password again and hit return key.

change-iphone-root-password-11change-iphone-root-password-12

You have changed your root password used to SSH into iPhone. Now you need to change your mobile password as well (thanks Jim for the tip)

Now type passwd mobile and hit return key.

change-iphone-mobile-password-(1)

Old Password: alpine

then you’ll be asked for new password twice. It is OK to use the same new password you used for the root account. Just don’t use ‘alpine’.

change-iphone-mobile-password-(2)

You’ve secured your iPhone by changing root password from unauthorized access.

You may also like:

Don’t forget to Follow us on Twitter or Subscribe via RSS to receive latest iPhone related Guides hacks and much more.

If this page or section of the page needs to be updated, Submit Request

Share/Save this Post

  • Digg
  • Twitter
  • StumbleUpon
  • Facebook
  • Reddit
  • del.icio.us

Comments:

  1. Robin 10 November 2009 at 6:24 pm #

    Thank you for the info

  2. Jim 24 November 2009 at 8:27 pm #

    Hi again iPhoneHeat,

    This is very good — but as threats become more serious, I think it is essential that people also change their password for the ‘mobile’ account. The mobile account is just as vulnerable as the root account and it holds ALL your data! It has the same password as ‘root’, and I think it will be a very short while before a criminal hacker will start to use that hole: most tutorials, including yours, now tell people to change the root password, but they forget mobile.

    USERS READING THIS: After doing the steps above, with the terminal still running, you should type:

    passwd mobile

    and it asks for your new password (twice). It is OK to use the same new password you used for the root account. Just don’t use ‘alpine’.

    • iPhoneHeat 25 November 2009 at 12:49 pm #

      Thanks for the tip Jim..
      Updating..

  3. neoTUGA 9 December 2009 at 8:49 pm #

    Hey,

    Very good guide, but that password doesn’t work on my iPhone,
    is there any other??

    I have already reloaded the firmware and reinstalled everything and still nothing..

    Can you please help?

    iPhone 3G 3.1.2
    JailBroken

    Thanks
    nT

    • iPhoneHeat 9 December 2009 at 10:59 pm #

      which password?

      • neoTUGA 9 December 2009 at 11:34 pm #

        The User password, both root and mobile, it is not alpine.. :S

        Thanks for the reply.

        • iPhoneHeat 9 December 2009 at 11:42 pm #

          defaults are alpine..

          • neoTUGA 9 December 2009 at 11:43 pm #

            So I’ve seen everywere but not on mine :(

  4. reesepryde 17 December 2009 at 9:30 pm #

    Hi,

    I love the theme in the iphone pictures! Any idea which one it is? (The 5th picture)

    thanks!
    Reese

  5. reesepryde 17 December 2009 at 9:36 pm #

    I am trying to use your methods but once I type in su, it asks for a password and although I am trying to type, nothing shows up on the screen.
    what’s wrong?

    • iPhoneHeat 18 December 2009 at 12:10 am #

      Password remains invisible .. just type the correct password and hit the return button on iPhone keyboard

  6. mandres 5 January 2010 at 4:02 am #

    Once you have made all the changes within MobileTerminal do we have to keep that package installed or can we uninstall it?

    • Jim 7 January 2010 at 1:24 am #

      When you have changed the two passwords, you can remove MobileTerminal.

  7. rkhaleel 21 January 2010 at 9:14 am #

    I got a new iphone 3Gs last month Dec-09 but it is not taking the default password as alpine for root or mobile. Not sure if it is changed in the new version… can someone help.
    Thanks in advance.

  8. drmrsthemonarch 1 August 2010 at 9:12 am #

    What if MobileTerminal doesn’t work? I downloaded this application on a jailbroken iPhone 3G running iOS4 (or whatever the comparable Jailbroken OS is).


Leave a Reply