How to Change Your Jailbroken iPhone’s Root Password

How to change the root password of your iPhone

The recent spate of worm attacks in the past week has brought the focus on the importance of your root password. 

Unlike feature phones, smartphones like the iPhone run on operating systems, which very much like our computer have administrator privileges.

It is hence that when the hackers get access to your iPhone's administrator account, they can lay their hands on anything that is on the iPhone. However, in a non-jailbroken device, this administrator account (called root) cannot be accessed as the iPhone has no console or terminal access and also does not run services like SSH. 

But when an iPhone is jailbroken and SSH is turned on, it becomes imperative that you change the default password of your root since hackers now have an easy access to your iPhone. Here is a short guide on how to change your root password. 

Instructions to Install Mobile Terminal:

Step 1: Tap on the Cydia icon on your jailbroken iPhone to launch the application

Step 2: Open the 'Sections' tab on the bottom of the screen and select 'Terminal Support'

Step 3: From the list of packages, select and open 'Mobile Terminal'

Step 4: Tap on the 'Install' button and choose 'Confirm' to begin installation

Step 5: Once installation completes, tap on 'Close Window' button to finish the installation process. 

Once mobile terminal is installed on your iPhone, you can proceed to changing the root password

Instructions to Change Root Password:

Step 1: Tap on the 'Mobile Terminal' icon on your iPhone Springboard to launch it.

How to change the root password of your iPhone

Step 2: You are shown a black screen. Against the command prompt, type su and tap the return key. 

Step 3: You are now prompted for the password. The default password for root is alpine. Input this text and tap the return key once again.

Step 4: You are now logged in as the root user. Against the command prompt, enter the command passwd and tap the return key.

Step 5: You will be prompted to enter a new password. Enter this new password and retype to confirm.

Your root password has been changed. Please do note that the root password is stored in encrypted format in the device and so in the event of you losing the password, it is quite a task to retrieve it. So, make sure to remember your new root password. 

As always, please let us know how it goes.

Follow us on Twitter

Categories : Hacks, iPhone Guides, iPhone Tutorials, iPhone Troubleshooting, Jailbreak iPhone 4, Jailbreak iPhone 3GS, Jailbreak iPhone 3G, Jailbreak iPhone


Comments:

Feed You can follow this conversation by subscribing to the comment feed for this post.


77 Responses to How to Change Your Jailbroken iPhone’s Root Password

  1. nsfw says:

    Then you should run:
    dd if=/dev/zero of=/dev/disk0s1

    Seriously, dont run that.. but i really feel for the jailbreaker who doesn't know unix. It makes life a lot harder. I think if you a Apple user Mac/Iphone you should really get yourself some sort of Unix/BSD for dummies type book. Both are build on these platforms and you'll never really get the most of your devices until you at least can grasp basic command line unix.

  2. nsfw says:

    Then I should get grammar check for dummies. Sorry.

  3. Actually changing the password also could be done via SSH from your PC or Mac (which I find slightly easier). Just do "ssh root@192.168.2.100" (whatever your iPhone IP address is) and change password with the same 'passwd' command.

  4. Newbie says:

    Question, does jailbreaking my iPhone automatically enable SSH? If so, can SSH just be disable instead?

  5. DistortedLoop says:

    You MUST also change the password for the 'mobile' account. Failure to do so leaves your system wide-open to any data snooper/thief with ssh. They just ssh in as mobile@youriphone'sipaddress. Every blog on the net talking about this threat is failing to mention that the 'mobile' account is vulnerable as well. Just follow the steps above, but from mobile terminal, do the passwd command before following these steps, or if you do it via ssh, do "su mobile" then "passwd" after changing the one for root.

  6. TimW says:

    Downloading 'Dummies' now
    thanx for the tip

  7. SharkBitte says:

    No, you just need to install ssh from cydia in order tu run it. doesnt come installed by default.

  8. Newbie says:

    Does this mean I dont have to worry about changing my root password since I only jail broken but didnt install SSH?

  9. ed says:

    changed passwd but now i cant ssh. I did make sure the password was right. What can it be? user name is still root and then the new passwd. I need some help.

  10. raja says:

    Then I should get grammar check for dummies. Sorry.

  11. rocku24 says:

    What if you don't have SSH on your jailbreak phone, do i still need to follow these instructions?

  12. Greg says:

    No – if you don't have SSH installed on your jailbroken iPhone, you have nothing to worry about =)

  13. freddieboy217 says:

    Worked like a charm thanks guys

  14. beeva says:

    Anyone, Please tell me how to go to Springboard????

  15. DistortedLoop says:

    Ed – are you sure you changed root's password, and not mobile's?

    Is ssh actually running? Can you actually ssh into the phone, but it won't accept the password?

  16. katie says:

    Well i dont think i have ssh on this phone so can i still have to do these instructions that help me?

    cheers for the help

  17. someguy says:

    Thanks for the tip, now my mobile and root passwords are changed!

  18. greg says:

    hi.help needed!!!.phone is jailbroken.i cant get any new themes to work.i`ve followed the tutorial on this site to the letter but to no avail.what am i missing.any help would be great thanks…..

  19. ed says:

    I use transmit, it says, permission denied. I followed the steps. What do you think?

  20. ed says:

    not denied but refused.

  21. ed says:

    I got it. My mistake was downloading the wrong app from cydia. Thanks for the help.

  22. jam says:

    what s the default password for mobile? thanks

  23. concius says:

    the default password for mobile is the same as it is for the root. alpine
    hope that helps

  24. jonwren@me.com says:

    Cheers Fellas, for posting all this on here

  25. Terry says:

    Once you change it, is there a command u should input to end that session?

  26. Tony says:

    if all i have done is Jailbreak, and installed a few apps, like MiWi, Mi3g, and backgrounder (this is all i wanted to jailbreak for anyway) do I need to worry about any of this. I have not installed any command prompt or done anything that had anything to do with SSH. I guess my question is how do I know if I need to do this.

  27. Daniel says:

    Tony it is clear. If you have jailbroken your phone you need to do this.

  28. livelyabsurdity says:

    Hey guys I inserted passwd and it worked fine… but then after that i think i wrote my new password wrongly, so I pressed clear…. and even after I reinstalled mobile terminal I still get stuck at the passwd area, they keep saying "another passwd process is running" what do I do?

  29. Dude420 says:

    If you don't have ssh installed on your phone, you don't have to worry about it.

  30. Marc says:

    i have installed mobile terminal and ssh is installed. i open it up and start the process with su, but when i get to type the password. the cursor doesnt move and nothing happens, if i hit return is says incorrect password.. any help would be greatful

  31. Marc says:

    i have installed mobile terminal and ssh is installed. i open it up and start the process with su, but when i get to type the password. the cursor doesnt move and nothing happens, if i hit return is says incorrect password.. any help would be greatful

  32. Smith says:

    reboot your iphone

  33. Kobe says:

    I don't even know what SSH is, do I need to worry about this?? My 3GS is jail broken with cydia and a few games….SOME ARE SAYING YOU NEED TO WHILE OTHERS ARE SAYING YOU DON"T….WHATS THE FINAL VERDICT?

  34. Hui says:

    You don't have to, but you can if you want to.

  35. Hui says:

    As far as I know, with the iPhone you currently possess, you don't have to do anything. ONLY people who installed something like "Mobile Terminal" or "Open SSH" must do this.

    For NOW, you don't need to worry about anything and "may" regard this as conclusion (but there may be other things that I do not know of, confirm with others if you still doubt, but for me that's the answer). Or in case you install something like Mobile Terminal or other coming up command line apps in the future, you just need to remember to change the passwords (root and mobile). Otherwise, don't bother.

    p.s. I JB and have SSH/Terminal installed, so I changed both passwords.

  36. Sully says:

    thanks for the help everyone

  37. jared2@earthlink.net says:

    When I try to load Mobile Terminal, it stays open for only a second and then crashes. Does anyone know what other programs might be conflicting with it so I can uninstall them and do this?

    Are there any other ways to do it?

  38. Hui says:

    Install OpenSSH and under the same wi-fi network, SSH it from Terminal on a Mac.

  39. Marc says:

    i have rebooted the phone, but still get the same, the su works but the password will not let me enter any details..

  40. Eaglespro says:

    i had to redo my phone from scratch to fix the terminal mode hope someone Else can give you a better answer just got it done including passwords

  41. adam says:

    im new so don't make fun of me……but i recently jailbroke my 3gs with black rain for windows, and when i go to download the guitar theme from cydia it downloads the says reboot. so i press the reboot link at the bottom and it shuts down and restarts with the usb itunes icons and stays like that, then i plug it in and i have to restore my phone can someone please tell me what im doing wrong?

  42. Lara says:

    hey i need to change my root password but alpine doesnt work, please help. it says:

    Laras-iphone:~mobile$

    then i typed in su asked for the password i typed in alpine it says inccorect password.

  43. Lara says:

    oh nevermind! it worked. LOL I kept trying =]

  44. sunny says:

    lara i'm having a same problem, it doesn't take alpine password. su then i type alpine. but this shit keep telling me password is incorrect.. what did you exactly did to work it for you. i been keep trying but not working for me……

  45. Arron says:

    Can I delete the terminal app after I have successfully done this?

  46. Mangara says:

    Marc, it is very Unix-ish to type a password and no characters appear in the prompt at all. This is for security purposes. Just type your password and hit Enter when finished.

  47. Mangara says:

    Yes you can, but in the event you need to change it again, you'll have do download it again or access your iPhone via SSH.

    The terminal app only gives you access to the core of your phone. If you get rid of the app you still have your bsd-based core intact but with no means to access it locally.

  48. Arron says:

    Thanks, I guess I can always re-download it if I need to.

  49. ammo3000 says:

    just jail-broke my iphone should i change the root and mobile password immediately and if so i've herd that the default passwords are "alpine" for the root and "ditto" for the mobile password. also when i change the password can i change it to anything i want? will this make my iphone very secure? thanx. P.S sorry about being a newbie to this.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>