Master.passwd Help

tj911t

New Member
Bronze
Jul 7, 2007
36
0
0
#1
Can anyone tell me what the file properties should be for /etc/master.passwd? (Owner, Group, Everone -> Read/Write/Execute)? What should a good file look like?

I tried the Term-vt100 solution from Tinman to fix the JB 1.1.3 login problem by editing one line from the master.passwd file and now I am all screwed up. Does anyone know how simply editing the master.passwd file could cause iTunes not to sync anymore, installer to loose all information about the apps it has already installed, and all my photos/music/videos/weather cities/stocks to disappear? I think I may need to start over if I can't find a quick fix. Any recommendations?

Thanks!
 

x666x

New Member
Bronze
Jan 24, 2008
443
0
0
#2
You can't fix it, it doesn't work, says so on the Installer "Featured" page.

From what I can recall from TM's post, he was under the impression he fixed it and things were working, however in another post or perhaps farther down he stated that he was fed some misinformation onscreen that affected his results.
 

tj911t

New Member
Bronze
Jul 7, 2007
36
0
0
#3
Thanks x666x for responding...

Do I need to redo the whole jailbrake again? I don't care so much about fixing the vt100-term issue (wish I would have left it alone), I just want to get my preferences and iTunes stuff back? Any thoughts?

Thanks again....
 

x666x

New Member
Bronze
Jan 24, 2008
443
0
0
#4
Well, if you don't have a backup copy of your master.password file then you may need to restore and start over.

I did a quick search and found this over on Hakint0sh that may help. I mean if you're borked already it can't get any worse right?

http://www.hackint0sh.org/forum/showthread.php?p=207142

If all else fails, restore and start over. Sorry, but the 2nd time is always a lot easier ;)
 

tj911t

New Member
Bronze
Jul 7, 2007
36
0
0
#5
I did have a copy of my original master.passwd file but even restoring that file (using upload in ibrickr) does not seem to fix my problem. Thanks for the link, but I don't really care about getting the passwords working with term-vt100 anymore, I just want to get back to where I was before I changed the master.passwd file. It seems like changing that file somehow changed where the iPhone (and iTunes) looks for its preferences? I think they are all still there, just not pointed to correctly. For example, when I launch the mail application, I get the default yahoo, gmail, etc. page like it has no mail accounts. But, when I look at the Bossprefs page it still sees all of my mail accounts listed and allows me to turn them on and off? Also, all of my apps that I installed are still on the springboard but installer thinks none of them are installed?
 

tj911t

New Member
Bronze
Jul 7, 2007
36
0
0
#6
Some progress, new problem "iTunes cannot read iPhone"

I found a mistake I made, doh.... I rechecked the contents of the master.passwd file on my iPhone and found that the mobile user line did not go back to the original 0:0 settings as I thought (they were still set to 501:501). I used mobile finder and text editor on the iPhone to edit the file to 0:0 and set the permissions back to read only (except for owner with write). I rebooted my iPhone and all my old preferences came back! (yeh) I thought I was home free until I tried to connect to iTunes and I got this error message:

"iPhone cannot read the contents of the iPhone" and advising me to restore?

I went to the iPhone edit/preferences and deleted my backup and reset the sync status, closed iTunes and rebooted both PC and iPhone and I still get the same error message?

I don't want to restore now that I have all my apps and preferences back. Does anybody know how to fix iTunes so it can see my iPhone without restoring?

Thanks for any help...
 

Tinman

Evangelist
Gold
Jul 16, 2007
4,334
183
63
Aridzona
#7
I found a mistake I made, doh.... I rechecked the contents of the master.passwd file on my iPhone and found that the mobile user line did not go back to the original 0:0 settings as I thought (they were still set to 501:501). I used mobile finder and text editor on the iPhone to edit the file to 0:0 and set the permissions back to read only (except for owner with write). I rebooted my iPhone and all my old preferences came back! (yeh) I thought I was home free until I tried to connect to iTunes and I got this error message:

"iPhone cannot read the contents of the iPhone" and advising me to restore?

I went to the iPhone edit/preferences and deleted my backup and reset the sync status, closed iTunes and rebooted both PC and iPhone and I still get the same error message?

I don't want to restore now that I have all my apps and preferences back. Does anybody know how to fix iTunes so it can see my iPhone without restoring?

Thanks for any help...
Which location is iTunes_Control, root or mobile? (The copy with your media data in it.)

I got that message and was able to get past it via moving some things around via SSH. But my entire dev team jb was a piece of crap.

So since then I've re-jailbroken, and this time it went much better. Still had the Term-vt100 login issue though. Found a solution that works better:

Install http://www.trejan.com/irepo/ source in Installer. Then install "SUID Lib Fix" and "Term-vt100 SUID fix" from the Tweaks 1.1.3 cstegory.

Term-vt100 now lets me login as root.



--
Mike
 

tj911t

New Member
Bronze
Jul 7, 2007
36
0
0
#8
Which location is iTunes_Control, root or mobile? (The copy with your media data in it.)

I got that message and was able to get past it via moving some things around via SSH. But my entire dev team jb was a piece of crap.

So since then I've re-jailbroken, and this time it went much better. Still had the Term-vt100 login issue though. Found a solution that works better:

Install http://www.trejan.com/irepo/ source in Installer. Then install "SUID Lib Fix" and "Term-vt100 SUID fix" from the Tweaks 1.1.3 cstegory.

Term-vt100 now lets me login as root.


--
Mike
Tinman,

It looks like my media is in mobile at:
/var/mobile/Media/iTunes_Control/iTunes/iTunesControl

I have a strong suspision that my problem has something to do with the permissions on the file master.passwd. Do you know what the permissions should be for a dev team jailbreak?

Here is the funny thing.... When I revert my master.passwd file to the file with the mobile permisions set to 501:501, iTunes sees my iPhone and I can sync it and add/delete music/videos and ringtones. BUT, in this state, I do not see them when I hit the ipod button in the dock. NOW, when I change the master.passwd file again back to the original with mobile permissions set to 0:0, iTunes gives me the error message, but now all of the sync changes I just did with the other master.passwd file are now there?

I think I am close, if I just knew what the permissions are for a dev team jailbreak master.passwd file and how to set them correctly with ssh?

Also, I thought you were not happy with your latest jailbreak and were thinking of going back to 1.1.2? I have been really close to trying x666x's tutoral 1.5-2 Hour jailbreak but have seen a lot of people with problems trying to downgrade and then back up. Is there a significant risk of bricking or is there always a way to get restored somehow? -- Also heard that Nate may be just about to release a fix to his original JB that might be even better than dev teams..... so many options, hard to know the right path...
 

Tinman

Evangelist
Gold
Jul 16, 2007
4,334
183
63
Aridzona
#9
Tinman,

It looks like my media is in mobile at:
/var/mobile/Media/iTunes_Control/iTunes/iTunesControl
Good that's where they need to be with the dev team jb.


I have a strong suspision that my problem has something to do with the permissions on the file master.passwd. Do you know what the permissions should be for a dev team jailbreak?
Group is wheel, owner is root, and permissions are 0600.



Here is the funny thing.... When I revert my master.passwd file to the file with the mobile permisions set to 501:501, iTunes sees my iPhone and I can sync it and add/delete music/videos and ringtones. BUT, in this state, I do not see them when I hit the ipod button in the dock. NOW, when I change the master.passwd file again back to the original with mobile permissions set to 0:0, iTunes gives me the error message, but now all of the sync changes I just did with the other master.passwd file are now there?
Sounds like iTunes is looking in .../root/Media and the iPhone is looking in /mobile/Media. If you get the permissions right, and have the file back to its original state, you should be OK (hopefully).



I think I am close, if I just knew what the permissions are for a dev team jailbreak master.passwd file and how to set them correctly with ssh?
See above. I've attached mine, in case you want to try that (from a freshly jailbroken dev team 1.1.3). Unzip and replace yours with it, then set permissions.



Also, I thought you were not happy with your latest jailbreak and were thinking of going back to 1.1.2? I have been really close to trying x666x's tutoral 1.5-2 Hour jailbreak but have seen a lot of people with problems trying to downgrade and then back up. Is there a significant risk of bricking or is there always a way to get restored somehow? -- Also heard that Nate may be just about to release a fix to his original JB that might be even better than dev teams..... so many options, hard to know the right path...
Don't worry, you can always restore if need be.

After thinking it over I decided I didn't want to go backwards so re-jailbroke. This time it went well. Used dev team's version 3 of the jb.



--
Mike
 

Attachments

tj911t

New Member
Bronze
Jul 7, 2007
36
0
0
#10
Don't worry, you can always restore if need be.

After thinking it over I decided I didn't want to go backwards so re-jailbroke. This time it went well. Used dev team's version 3 of the jb.



--
Mike
Thanks for the encouragement, I may just re-jailbreak anyway but I have been making some progress fixing my issues and I am learning some new stuff so I want to keep going a little more. Right now, I can sync to iTunes but get an error at the end (but music and videos I sync are on iPhone so the error is mostly a nuisance).

First, I used PuTTy to ssh into my iPhone as root and found that a bunch of my files in /var/mobile/Media/iTunes_Control had an owner of root (from when I synced with the master.passwd file settings at 0:0. I did a recursive chown to the mobile user and iTunes no longer gave me the "cannot read iPhone" error. I still get a "The iPhone .... cannot be synced. An unknown error ocured (-54)". I think this is due to another owner conflict where a file is set to root and should be mobile.

Question: Should all files in the /var/mobile directory and below have an owner of "mobile"? Can I simply do a recursive chown at /var/mobile to the mobile user or will this break something else? Can you check to see if your /var/mobile has any files that do not have "mobile" as user. I checked mine and there were a few files sprinkled around with the root user?

-- thanks again for your insight.
 

Griffinaz

Zealot
Gold
Oct 5, 2007
1,046
13
38
Phoenix, Arizona
#11
Found a solution that works better:

Install http://www.trejan.com/irepo/ source in Installer. Then install "SUID Lib Fix" and "Term-vt100 SUID fix" from the Tweaks 1.1.3 cstegory.

Term-vt100 now lets me login as root.



--
Mike
Twice today you have saved me from ripping my hair out. Thank you for all the great information Mike. I use term on the phone to do just about everything and when it kept asking me for a password I was lost. Your fix above worked perfectly and I am back running again on 1.1.3 jailbroken.
 

Tinman

Evangelist
Gold
Jul 16, 2007
4,334
183
63
Aridzona
#12
Twice today you have saved me from ripping my hair out. Thank you for all the great information Mike. I use term on the phone to do just about everything and when it kept asking me for a password I was lost. Your fix above worked perfectly and I am back running again on 1.1.3 jailbroken.
Glad it worked for you. I too use terminal a lot and was lost without it.


--
Mike