Change iPhone's root password

Amplify Logo ImageAmplify provide web and digital media solutions.

Amplify offer a diverse range of services for business wanting to succeed online, and take a primary focus on consultancy, development and support for e-Commerce, e-Learning and Joomla! Content Management System projects... ...
we just mention these in particular, because we cannot fit in this space all of the other great things we do!

Recently there has been stories on the web about a Dutch hacker gaining access to an iPhone when it has been jailbroken and running the SSH service without the default admin-level passwords changed. We have also seen an Australian example of an iPhone virus exploiting this feature. We can do something about this to protect our device, so here are some instructions for changing the default password.

How To Change The iPhone’s Default Admin Account Passwords:

These instructions are to change the root password using your phone and mobileterminal, and assume you are running iPhone OS 3.0 or above on your device, some other firmware versions may vary in their default passwords. This tutorial assumes your device is jailbroken and running the SSH service.

The app to use on the iPhone is called MobileTerminal, and it’s available for free in the Cydia store. Once you have MobileTerminal installed, launch it and you should see a prompt saying this or similar:
iPhoneName: ~ Mobile$

After this prompt, type: passwd
You will then be prompted for the ‘old’ (current) password for the mobile user. Enter this as the old password: alpine
You will then be prompted to enter the new password. Simply type in your desired new password.
You will not see characters appearing on the screen as you type – that’s normal so don't worry.
You’ll then be prompted to re-enter the new password.
You should then be returned to the Mobile$ prompt that you started on when opening the MobileTerminal app. There’s no success message to say the password was changed, but if you’re returned to the prompt and do not get an error, the change was successful. And you’re done with change for the mobile account.

The second primary admin account for the iPhone is called root – so now you need to change that as well.
Type this to switch to the root user: login root
You will be prompted for the root user’s current password. Enter this: alpine
Type this to start the password change routine again: passwd
Enter the old password for root (it is ‘alpine’, same as for the mobile user) and enter your desired new password twice, just as you did for the mobile account

You will be taken back to the main Mobile$ prompt, and our job here is done!