How can i get rid of a password on iPhone 6S?

I was going to give my iPhone 6S to my brother and to do that I needed to wipe all settings. I clicked the reset all button in settings and now it is asking me for a password. It is not my old password and it is not my brothers either. How can I fully reset my phone again to get rid of the password?

There's always the alternative of turning on the 10-attempt wipe feature for the lock screen the purposely getting the password wrong 10 times.

Erase your device with recovery mode to remove your passcode

If you've never synced with iTunes or set up Find My iPhone in iCloud, you'll need to use recovery mode to restore your device. This will erase the device and its passcode.

Connect your iOS device to your computer and open iTunes. If you don't have a computer, borrow one from a friend, or go to an Apple Retail Store or Apple Authorized Service Provider.
While your device is connected, force restart it:
On an iPhone 6s and earlier, iPad, or iPod touch: Press and hold the Sleep/Wake and Home buttons at the same time. Don't release when you see the Apple logo. Keep holding both buttons until you see the recovery mode screen.
On an iPhone 7 or iPhone 7 Plus: Press and hold the Sleep/Wake and Volume Down buttons at the same time.
Don't release when you see the Apple logo. Keep holding both buttons until you see the recovery mode screen.

When you see the option to Restore or Update, choose Restore.

The password it is looking for is your apple ID password. You can't reset your iphone until you enter the password. If you can't remember it go to my apple id and follow the prompts for lost password.
https://appleid.apple.com/...age=signin