How to Override an iPhone Passcode
- 1). Restore your iPhone back to the default settings to override the passcode. To do so, connect your iPhone to the computer using the USB cable that came with your phone and launch iTunes. iTunes displays your device in the left panel under "Devices."
- 2). Click your iPhone under "Devices" and click the "Summary" tab. Click the "Restore" button. Keeping in mind that restoring your iPhone back to the default settings deletes all the currently saved information. When prompted, click "Backup" to back up your iPhone.
- 3). Click "Restore" again and follow the final guided prompts to restore your iPhone back to the default settings. When the process completes, click "OK." You should see the "Connect to iTunes" message on your phone. Keep your iPhone connected to the computer until the "Connect to iTunes" screen goes away or you see "iPhone is activated" message on your phone.
- 4). Right-click your iPhone under "Devices" and click "Eject." Close iTunes and disconnect your iPhone from the computer. Your iPhone no longer prompts you to enter the passcode.
Source...