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

Like this post? Share it!

  • nsfw

    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.

  • nsfw

    Then I should get grammar check for dummies. Sorry.

  • http://profile.typepad.com/6p012875a9dc8a970c Vyacheslav Zholudev

    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.

  • Newbie

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

  • DistortedLoop

    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.

  • TimW

    Downloading 'Dummies' now
    thanx for the tip

  • SharkBitte

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

  • Newbie

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

  • ed

    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.

  • Vishnu

    Yea..

  • http://www.adsglobe.com... raja

    Then I should get grammar check for dummies. Sorry.

  • rocku24

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

  • Greg

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

  • freddieboy217

    Worked like a charm thanks guys

  • beeva

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

  • DistortedLoop

    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?

  • http://www.iphonecases.org katie

    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

  • someguy

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

  • greg

    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…..

  • ed

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

  • ed

    not denied but refused.

  • ed

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

  • jam

    what s the default password for mobile? thanks

  • concius

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

  • jonwren@me.com

    Cheers Fellas, for posting all this on here

  • Terry

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

  • Tony

    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.

  • Daniel

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

  • livelyabsurdity

    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?

  • Dude420

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

  • http://profile.typepad.com/langham Marc

    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

  • http://profile.typepad.com/langham Marc

    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

  • Smith

    reboot your iphone

  • Kobe

    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?

  • Hui

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

  • Hui

    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.

  • Sully

    thanks for the help everyone

  • jared2@earthlink.net

    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?

  • Hui

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

  • http://profile.typepad.com/langham Marc

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

  • Eaglespro

    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

  • adam

    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?

  • http://. Lara

    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.

  • http://. Lara

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

  • sunny

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

  • Arron

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

  • Mangara

    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.

  • Mangara

    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.

  • Arron

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

  • ammo3000

    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.

  • Capt

    today my iphone (jailbroken 3.0) is stucked, first I was not able to access it via WinScp with usual password (alpine), later on I tried to close(not hard reset) and now can not open again, it stucks with apple logo, hard reset does not work also connected with itunes but does not work too, itunes recognize
    my iphone, some time later apple logo comes back and the same story, please help, thx…

  • Me

    After you reboot plug unto your computer and run blackrain again for a few seconds…it will start like nothing happened. Ishappening on all iPhones made after Oct 09

  • Kim

    Thanx – I followed the instructions for changing root password then followed yours for changing mobile password – anyone not used to Unix (and I'm one of them) should type 'exit' to get right back to the start of the session. (I think I'm right, but feel free to correct me).

  • newjack

    how do i change the mobile password? i followed the instruction on changing the root password and did it succesfully.

  • DaXx

    do i need to do this if im never use the internet on my iphone, its basically disabled

    thanks

  • mx1941

    Can someone help me on this one?
    I can't upgrade my system-cmds, which is also needed to install Mobile Terminal. When i open Cydia on my iphone it says that a upgrade is needed. I can choose upgrade essential, complete upgrade or ignore temporarily. When i choose to upgrade, both essential as well complete, i get errors trying to install a newer version of system-cmds. When it's running i get the following errors:

    Error: running
    sub-process /usr/bin/dpkg returned
    an error code (1)

    Then i can press okay en i get this message:

    /var/cache/apt/archives/firmware-sbin_0-1_iphoneos-arm.deb
    sub-process pre-installation script returned error exit status 1

    Does anybody know what is going on? What do i need to do to fix all this crap?
    Thanks

  • ese

    I NEED HELP WITH THIS TOO :(

  • Navihc@comcast.net

    I got my ipad jailbroken. Do I also need to change the root password as with the iphone?

  • http://profile.typepad.com/cordovanian Cordovanian

    Mobile terminal not working with iOS4.

  • Freddieboy

    Correct opens and closes straight away

  • http://20years.net/blogg paul compton

    Is there any variation to the default passowrd? I have tried alphine, but it comes up with incorrect password from the start? Yet I have never changed it??

  • greg

    any fixes to this. It's happening with mine as well

  • Jim

    Mobile Terminal does not work on my jailbroken unlocked 3G with iOS4 — opens then closes immediately without showing a cursor.

  • greg

    ditto. hopefully there will be a fix soon. ios4 also lags on the 3g i noticed

  • Meidas

    I have same issue, as you Jim. iPhone 3g + iOS 4.

  • lax@tcs.com

    Mobile Terminal Crashing.

    I have a 3g phone
    upgraded to ios 4.0.1
    Jail broke using redsn0w_win_0[1].9.5b5-5
    Unlocked using Ultrasn0w 0.93

    Wanted to change the root password. So installed 'mobile terminal' using cydia. But when I lanuch the application it crahes.

    Can you let me know what I am doing wrong ?

  • http://profile.typepad.com/manny1280 Manny1280

    hello i changed the default ssh password a while ago but now i forgot what i changed it to. how do i reset everything or retrieve the old one?

  • blueegg

    Hi. I've jailbroken, installed Cydia,installed mobile terminal but I can't seem to start the Terminal (Mobile terminal) from the Springboard. I click on it and the black screen comes up in a flash and that's it. Back to the Springboard. I've reinstalled it a couple of times and rebooted my iphone4 as well. Can you help me please?
    One other question. I've already copied SMS ringer to Iphone via SSH already and I won't be need to do this again any time soon so I'm wondering if there is a threat of being hacked if I just leave it like this. I have SSH installed via cydia but if I don't connect to a PC via Wi-Fi it won't be a threat?

  • RBSHoo

    same problem here.

  • http://profile.typepad.com/6p0133f32a9e29970b www.google.com/accounts/o8/id?id=AItOawn-3Z1K9MLr6qYjyyIN736OaBaq0JoUUKQ

    I also couldn't get Mobile Terminal to work – I think it is incompatible with iOS4 and hopefully a fix will be along shortly.

    In the mean time you can try this:
    1) In Cydia install "OpenSSH" ssh server.
    2) Download PuTTY (or a similar SSH client). Google a download site.
    3) Run PuTTY and SSH into your iphone using "root@192.168.1.3" or whatever IP address your phone is. Password is "alpine"
    4) Enter "passwd" to change password.
    5) Enter "su mobile". Password is "alpine"
    6) Enter "passwd" to change that password too.
    7) Enter "exit". Close window!

  • Mox

    thanks!
    just did it, just used Mac's Terminal instead of putty.

  • damn bot

    my terminal keep crashing over and over after unlock and jailbreak :S

  • SSH Question

    if you turn off SSH is the iPhone still vulnerable?

  • randomguy

    for anyone still needing help for mobile terminal crashing on startup i had the same problem and fixed it following the instructions in this link:

    http://code.google.com/p/mobileterminal/issues/detail?id=172#c82

    changed my root and mobile pass easily

  • randomguy

    see this link if mobile terminal is crashing on start up for you:

    http://code.google.com/p/mobileterminal/issues/detail?id=172#c82

  • Pingback: Bharath's Blog World

  • Nicole

    Hey trying to change terminal password. Did everything you said, only when I select it off spring board it opens and then closes right away. I tried re installing it and rebooting phone but not working still. I have 4g. Please help, lol not computer savvy. Thanks
    Nicole

  • Laura

    THANKYOUUUUUUU :D this was really useful information! My online banking was hacked, is there a way i can remove any malware that was previously installed on my phone without having to re jailbreak..Thanks

  • http://jokerz.web.id/ JOKERz

    work like a charm

  • Wolfeh

    worked perfect. :)

  • yo

    how to delete this :I

  • Zak

    Thank you for sharing the info :)

  • EO

    when i got to terminal support it just shows “Bourne- Again sHell” not mobile terminal

    I have an iphone 4 and installed absinthe 2.0.4

    • UnknownMuch

      same problem here dude…dunno what to do =S
      –iphone 3gs, redsn0w 0.9.14

      • UnknownMuch

        nah it’s fine now, just waited for some time and the ‘mobile terminal’ thingy showed up…then i just followed the instructions and changed the password :)

  • Aaliyah

    Mines says another password process is running…what do I do?!

    • http://www.iphonehacks.com iPhoneHacks

      Restart your iPhone and try following the steps again.

  • piranha

    No problems..worked as described…

    (Note, I had to wait for new packages to download…then I found terminal support)

  • EnyonEugenius

    Done! Thanks for help :)

  • http://twitter.com/KILLDJOI Claes Wikman

    Worked like a charm.

  • Vicks

    I managed to download and install the mobile terminal , i thereafter launched mobile terminal Typed SU but nothing happens. I tried the default password (alphine) but it comes with incorrect password. Please help :(

  • Farhad

    very simple instructions and got it changed. thanks

  • bunnymom

    worked perfectly, thank you! (anything else important or cool I can do with mobile terminal?

  • eric magar

    it went great! thanks

  • Kaldr

    In the off chance that you forget the new password, how do you retrieve it? Using iPhone 4, 6.1.2, with evasi0n

  • Pingback: How To Jailbreak Your iPhone 4, iPhone 3GS Using Sn0wbreeze For Windows (iOS 4.3.1) | my repository synology

  • Pingback: 6 Things Jailbreakers Should Know after the release of iOS 7.1 | Smartphone Tips n Tricks

  • Pingback: SemiRestore7 for iOS 7 Released; lets you restore your iPhone without losing jailbreak | Jailbreak All iOS

  • Pingback: 6 Things Jailbreakers Should Know after the release of iOS 7.1 | Jailbreak All iOS