Secure your jailbroken iPhone against worm
If your iPhone was recently "Rickrolled," these six steps will show you how to change the root password on your jailbroken iPhone (or iPod Touch) to protect your device from a serious vulnerability.
If your iPhone was recently, the following six steps will show you how to change the root password--used to connect to your device via a Unix software secure shell--to protect yourself in the future.
Before starting, you will need to have MobileTerminal installed from the Cydia store. Then:
1. Tap the MobileTerminal icon to open a terminal window.
2. Enter su and press return.
3. Enter the current default root user password alpine and press return.
4. Type passwd and press return.
5. Enter a new password and press return.
6. Enter the new password again and press return.
The root password is now changed, and your jailbroken iPhone or iPod Touch is now a bit more secure than it was before and less vulnerable to the first worm detected that targets the iPhone.
Updated 11/11/09 at 5:27 p.m. PST: One commenter pointed out that the mobile user account, the default user on the iPhone, can access all your data and shares the same default password of alpine. You can change the mobile password by launching MobileTerminal and following steps 4 through 6 above.