Generally speaking, you need the Apple ID to reset your iPhone. iPhone needs you to enter the Apple ID to switch off your account and the Find My iPhone service will be turn off. If you are using iTunes to reset your iPhone, you need to enter the Apple ID when your iPhone reboots.
But if you have no Apple ID or passcode, you will have to reset your iPhone without Apple ID. To do this you need first put iPhone into DFU mode and connect it to your iTunes. Your iTunes will help you to reset your iPhone without entering Apple ID easily. Resetting your iPhone with this method will result in wiping all the data in your iPhone.
Step 1: Open iTunes on your computer and connect your iPhone to the computer with a USB cable.
Step 2: After that, turn off you device. Press and hold the Home button for 3 seconds.
Step 3: Put your iPhone into DFU mode: Press and hold the Power and Home button for 10 seconds. Then release the power button and keep holding the home button. When you see the Apple logo disappears, you have successfully put your iPhone into DFU mode.
Step 4: When iTunes detects that your iPhone is in recovery mode, you can restore it now.
Step 5: Click on Restore iPhone. Then you will be notified after the reset and your iPhone will take a restart.
After resetting your iPhone with the guidance mentioned above, you'd better create a new Apple ID and password in time.