This is a little post to show you how to reset your default root password after jailbreaking your iPhone/iTouch/iPad !
(This works for any iOS jailbroken device on any iOS version)
There are two ways to do this, first way is to do it via SSH, the second way is via mobile terminal.app
- You need to have OpenSSH installed on your device, to do this, just install the package “openssh” from Cydia
- Get your device’s IP address (Settings->WiFi) then tap on the blue arrow next to your WiFi connection and get your IP
- Connect to your device via SSH using any computer in your network, open up your terminal (cmd) and type the following
If this is the first time you connect to your device, you will see the following message:
The authenticity of host '192.168.1.2 (192.168.1.2)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx Are you sure you want to continue connecting (yes/no)? yes
Just type “yes” and hit enter
Warning: Permanently added '192.168.1.2' (RSA) to the list of known hosts.
You will next be asked to enter your password, the default root’s password is “alpine”
write alpine and hit enter
You will be then logged in to your device !, you shall see something similar to this:
Now you should change your password by typing in the command “passwd”
You will then be asked to type the new password, do that twice (make sure you don’t forget/loose the password)
Changing password for root. New password: Retype new password:
Congratulations!, You’re now safe from attacks.
Assuming that you can’t use SSH, so we’ll use the terminal on your phone directly !
- Install terminal.app (if you don’t already have it) by searching for “MobileTerminal” in Cydia
- Depending on your terminal, you can be logged in as a different use (“mobile”, “root”, etc…)
To know your current user, type in:
if it says “root” then you’re ready to go to step 5 , if it says anything else, proceed to step 3 !
- Switch the current user to “root” by typing “su” or “su root”
- The terminal will ask you for a password, which will be “alpine”, type it and hit enter !
- Now it’s time to change your password, type in the command “passwd”
- The terminal will show something similar to this:
Changing password for root.
- Type in your new password twice and you’re done !
Congrats again !, you’ve done it.
Changing your root password is a must, anyone in your network can access your iDevice and control everything on your gadget if you’re not secured !, after following this little tutorial you’ll be really safe to go and play outside.