See the article Turn off Find My on your iPhone or other devices - Apple Support
How to turn off Find My on your Mac
- Choose the Apple menu > System Settings (or System Preferences).
- Click your name (or Apple ID).
- Click iCloud, scroll down, then click Find My Mac (or click Options next to Find My Mac).
- Click Turn Off.
A pop - up appears , you'r Apple ID password is incorrect , click on Forgot password ?

Enter admin password in next window that you log in in with Mac , click on allow .

Enter new Apple ID password , in the fields and click on continue .

Click on reset password .

Now , your Apple ID password is reset note down in a diary for records .
If other devices are synced with Mac remove them Remove a device in Find My on Mac - Apple Support
To wipe the Mac hard drive follow the steps What to do before you sell, give away, trade in, or recycle your Mac - Apple Support