Monday, October 31, 2011

How to reset the iPhone Max passcode timeout back to 4 hours

Ok, I recently had to reload my iPhone from backup and I noticed that my phone would prompt me more frequently to type my passcode.  Now, I know it was not the frequent before.  Looking at the configuration for this, I found that the timeout is 1 hour and I know that it was 4 hours previously. Just to make sure I was not going insane, I removed my Gmail Exchange account and sure enough,  I could set my passcode timeout to 4 hours.  Looking around the internet, it sounded like this is a common thing for folks that use exchange to sync and is a policy setup by the exchange administrator.  Ok, thankfully, the internet always seems to have the solution to a problem so in a round about way, I found the solution.

As it turns out, there are two files that need to be changed; EffectiveUserSettings.plist and Truth.plist located in:

/var/mobile/Library/ConfigurationProfiles/PublicInfo

Probably the easiest way to edit these files would be to first install iPhoneBrowser and of course, your iPhone should probably be jailbroken.

In both EffectiveUserSettings.plist and Truth.plist, change the parameter maxGracePeiod to 14400 which is the number of seconds in 4 hours which should look like the following:



EffectiveUserSettings.plist

<key>maxGracePeriod</key>
<dict>
<key>rangeMaximum</key>
<integer>14400</integer>
<key>rangeMinimum</key>
<integer>0</integer>
<key>value</key>
<integer>14400</integer>
</dict>

Truth.plist


<key>maxGracePeriod</key>
<dict>
<key>preferSmallerValues</key>
<true/>
<key>value</key>
<integer>14400</integer>
</dict>






EffectiveUserSettings.plist

Truth.plist


0 comments:

Post a Comment