What if someone sold me his Macbook he doesn't need anymore?
When I remove old home profile and reinstall OS via Cmd+R (btw, would I need sudo pass for that?), after that would previous owner be able to block Macbook remotely or get any data about it?
In short: To be completely sure you would want to go to disk utility when booted with Cmd+R and erase your MacOS partition.
Some more: At this point (after erase+reinstall), assuming there were no hardware modifications (in theory you could install hardware tracking modules, wireless microphones and such, but it's rather corporate espionage/P.I./high profile legal domain) you should be good to go.
Booting with Cmd+R and doing just reinstall, without erasing partition can - in theory - leave some parts out.
Remote access is then controlled from system settings and remote wipe can be performed, if you are connected to iCloud (or have some 3rd party app running, which after partition erase you would not have).
The most careless would be to just remove user profiles on newly bought Mac, as there might still be some apps running in background, that you would not even see in Applications folder.
I second @Marek, and want to add: You should also make sure you reinstall from a clean installation disk / or an OSX installer you downloaded on a clean machine. The installer on the installation partition might also have been tampered with. In the end, it depends on the level of paranoia you choose to satisfy...
Yes, someone could spy you. There is one user that could be enabled named "root". When this user is enabled and can be used as a Mac OS X user he can not only spy you but he can do everything to your machine he likes. Sudo user is not the same as the root user because a sudoer is given root privileges for a certain time, the root user has no privilege limits at all.
To make your mac "safe" it's better to do a clean install.
EDIT: Requested a more detailed solution
You can install your mac in multiple ways (optical disk, USB/FireWire/Lightning connected external drive, network and recovery partition) but when launching your mac you can ask the machine for it's startup disk menu when holding down the option key (alt key) when you turn on the machine. Choose the startup disk that has the recovery/installation software. An installer or recovery will start up and need to follow the steps below.
Note: If you don't want to lose all of your data make a (time machine) backup first
After booting recovery or installation software and you're inside the recovery/installing mode you need to do the following steps:
- start disk utility
- erase the volume where Mac OS X is current installed (probably named Macintosh HD)
- quit disk utility
- start Mac OS X installer
- Select the erased volume if needed and start continue the installer
- After a while the machine will reboot as if it came out of the factory.