Results 1 to 2 of 2
Discuss Deleted root password by mistake now phone restarts at the General -; Hello, I mistakenly deleted the root password in a failed attempt to change my forgotten ...
  1. #1
    Newbie Array

    Join Date
    Oct 2012
    Post Thanks / Like
    Rep Power

    Default Deleted root password by mistake now phone restarts

    Hello, I mistakenly deleted the root password in a failed attempt to change my forgotten root password. My phone now restarts nonstop and does not go past the bootlogo screen. What can I do without having to restore and rejailbreak as I will loose ALL my cydia apps, tweaks, themes, setting, and all info on my phone...

  2. #2
    Newbie Array

    Join Date
    Oct 2012
    Post Thanks / Like
    Rep Power


    Well here's the instructions:
    1. Open up cydia.
    2. Wait for it to do that "Loading data" crap and hope that it's loading something more than 'home' because you're just going to go straight to search.
    3. Search for a package called iFile.
    4. Install iFile.
    5. Once iFile is installed close cydia and open up iFile.
    iFile is a program that will let you browse, open, and maipulate files. This includes moving them. It dose this with root powers.
    6. In iFile browse to the /etc directory (top left a few times, then find 'etc' and tap that).
    7. Once in /etc/ scroll down to a file called 'master.passwd'.
    8. Press the edit button (top right).
    9. Tap on the letters 'master.passwd' that indicate the file 'master.passwd'. This should put a little red dot to the left of it.
    10. Tap the icon/button thing in the bottom right (looks like an arrorw speeding out of a picure frame (or one of those pictures you get after roller coasters, upside down).
    11. Select 'copy'.
    12. Tap 'Done' (top left, where edit was).
    13. Tap the home icon/button thing (bottom, second from the right, looks like a house).
    Now you're in '/var/mobile' if I am correct.
    14. Tap edit again.
    15. Tap that bottom right copy/cut/paste arrow-in-a-picture-frame button thing that you tapped before (I'd tap that).
    16. Tap paste.
    17. Tap the blue circle to the right of 'master.passwd'.
    18. See where is says 'Ownership', followed by these two lines:
    Owner root >
    Group wheel >
    tab on owner, change it to Mobile. Then do the same for Group. So you have:
    Owner mobile >
    Group mobile >
    19. Close iFile.
    20. Go to terminal (I presume you already have it installed as you use openSSH, is that a good presumption? Dose everyone have Terminal? Well if you don't: install Terminal just how you did with iFile (through cydia)).
    19. In the terminal (type pwd and make sure you're in /var/mobile, if it dosen't say '/var/mobile', type "cd /var/mobile" ).
    21. At the terminal type: "grep ^root master.passwd" you should see something like:
    root:UlGq3RrXWDrOc:0:0::0:0:System Administrator:/var/root:/bin/sh
    22. Take note of the string or random-looking letters and numbers between the first two colons (in the case above 'UlGq3RrXWDrOc') that is the password 'hash', an encrypted form of you password that cannot be unencrypted.
    23. Next you want to generate a new password hash. You can do this with the perl function 'crypt'. If you've no idea what that is head over to Test crypt online . At that website you see a large text area with $str above it, and a one-line text input with $salt above it. $salt can be any two characters, I chose Ul as that was what was there before and that makes me feel safe for some reason. In $str will be where you type your new password, go ahead and do that, and salt. Next click run.
    24. You will get a result like what you previous hash was (note if you've done this a different way and get something that looks like: $1$Rt79jmd6$526Di9l3ra//YfQ7BvD./1 that's bad, that's why you're going wrong. It should be shorter and without dollar signs).
    25. First backup the master.passwd you have in case do make a boo boo and have to start over. Do this by typing "cp master.passwd master.passwd.bak".
    26. Now you're going to edit the copy of master.passwd you have to replace the old hash with the new hash using a line similar to this: "sed -i s/root:OLD_HASH/root:NEW_HASH/g" replacing 'OLD_HASH' AND 'NEW_HASH' with you old hash and your new hash. For example:
    My old password was 'miakirshnerishot' and I want to change it to 'miakirshnerisREALLYhot!1!'.
    Password , , , , , hash:
    miakirshnerishot UlD3amElwHEpc
    miaisREALLYhot UlRsc4Sqd.Ayg
    Then at the terminal I'd be typing (stuff I type has a '$' before it:
    $grep ^root master.passwd
    root:UlD3amElwHEpc:0:0::0:0:System Administrator:/var/root:/bin/sh
    $sed -i s/root:UlD3amElwHEpc/root:UlRsc4Sqd.Ayg/g
    (please not that it's really easy to mistype something and screw it up, triple check both hashes you type in before you press enter.
    26. If you want you same for mobile (the user), in which case you'll be replacing 'root' with 'mobile', in the above example there are 3 'root's that you need to replace.
    27. Now that you've edited master.passwd you must replace the old one with the edited version. So close Terminal and go into iFile, make sure you're in you home directory.
    28. In iFile tap edit.
    29. Tap the letters 'master.passwd' to make that red dot appear.
    30. Tap the arrow-picture-frame bottom/icon copy/cut/paste thing.
    31. Tap Copy.
    32. Tap Done.
    33. Navigate yourself to /etc
    34. Tap edit again.
    35. Tap the copy/cut/paste arrow-picture-frame thing again.
    36. Tap paste.
    37. Choose to overwrite (don't worry you made that backup remember).
    38. Tap the blue dot to the left of to master.passwd.
    39. Under 'Ownership' change the Owner back to root, and the Group back to wheel.
    40. Go back into Terminal and check your root password by typing "su -" and entering your root password. Test the mobile password with ssh if you changed it.
    41. Now you can delete the master.passwd and master.passwd.bak in your home directory. Do this by typing "rm ~/master.passwd*".

    I found this solution here : How To Change iPhone Root Password [Step by Step Guide] | BLOG OUT LOUD!



Similar Threads

  1. Root password for 1.1.3 otb?
    By Etiennez0r in forum General
    Replies: 3
    Last Post: 02-18-2008, 11:21 PM
  2. Replies: 4
    Last Post: 11-17-2007, 05:40 PM
  3. 1.1.2 root password
    By aviegas in forum General
    Replies: 5
    Last Post: 11-11-2007, 02:51 PM
  4. Root Password
    By CaptainDickei in forum General
    Replies: 2
    Last Post: 09-10-2007, 04:07 PM
  5. Why changing the root password?
    By Don_Ron in forum Tools
    Replies: 3
    Last Post: 08-30-2007, 03:03 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012
All times are GMT +2. The time now is 03:55 PM.
twitter, follow us!