You can reset the password.
Do you need to recover data from it before you sell it? If not you can just wipe the disk and prepare it for sale.
See > Apple What to do before selling or giving away your Mac
Also See Thomas Reed's How to Prepare your Mac for sale
and this thread