1) Jailbreak your iPhoneI'm gonna assume you did this already, if you're actually trying to change your root password. There's no reason to change your password unless you jailbreak your iPhone, because no one will be able to access its command line in the first place.
- PwnageTool: http://blog.iphone-dev.org/
2) Enable and use Terminal on your iPhone
- Open the new Cydia app that PwnageTool installed and install MobileTerminal
- Launch the new MobileTerminal app (Skip to step 3)
2.1) (Alternate) Enable and use ssh on your iPhone
- Open the new Cydia app that PwnageTool installed and install OpenSSH
2.2) (Alternate) SSH into your iPhone from a computer on the same network
- Get the iPhone's IP from Settings > Wi-Fi > Blue arrow next to your network > IP Address
- At the command prompt (In Terminal on Mac or an ssh client on a PC):
- Enter the default root password: alpine
3) Change your iPhone's root password
- At the command prompt:
- Enter your new password twice as asked.
- You may also want to change the password for the 'mobile' user:
You Win! Now random people wont be logging into your iPhone.