How to get rid of SearchMine.Net on Safari

I hate to confess, but I made a terrible mistake… and it is embarrassing to write about it. The other day, I was looking for a math worksheet for my daughter. I went on a legit website, and clicked on the image to print. I was redirected on a page to update Adobe Flash. I never do that kind of things. It always smells fishy. But this time, my daughter is next to me whining. My son is playing with his noisy electric circuit. I have a online meeting coming up soon. I didn’t think too much… and I clicked on “update!” As it started to do things, I was thinking “not good…” I tried to cancel, but too late. Safari redirected me to

Hate to see this screen…

I was hoping it was not a big deal. I googled how to remove searchmine, and did a few things: get rid of any weird application, cleared caches, private information, extensions, looked at homepage, installed Malwarebytes, Avast, ComboCleaner (free to scan, but not to remove threats. What a scam! Hey ComboCleaner, if you’re not free, just say it!). SearchMine was still there.

Last thing to do: remove Mac OS profile configuration. BUT I was not able to do it. Profiles was greyed out:

Cannot use the UI to update profiles.

Only solution: use command lines since I was admin on my machine. First, list the profiles:

sudo profile -L

The list was like:

_computerlevel[1] attribute: profileIdentifier: some sort of ID
_computerlevel[2] attribute: profileIdentifier: some sort of ID
_computerlevel[3] attribute: profileIdentifier: com.mycouponsmart.safari.XXXXXXXXXXXXXXXXXXXXXX
_computerlevel[4] attribute: profileIdentifier: some sort of ID

Finally I see the culprit… To get rid of it, I removed it with this command line:

sudo profiles -R -p com.mycouponsmart.safari.XXXXXXXXXXXXXXXXXXXXXX

And that’s it! no more searchmine! Here are the lessons I have learned:

  • Hate Adobe Flash!
  • Hate myself for clicking on “Update.” I should have followed my instinct… If needed, go to the official website to download what you need.
  • Never assume you are too smart to avoid malwares.
  • Never assume Mac OS is free from malwares.

Defying Windows’ 260 character paths!

Windows is known for limiting paths to 260 characters which can be an issues when you deal with java packages. You cannot write, rename or delete files once the limit is reached. However there are a few tricks that can be helpful to go around this issue if you cannot shorten your paths.

Since Windows 10 Build 14352 and later, it is now possible to enable long paths… but it only works with Powershell (!!) Windows Explorer and third party applications do not work. (Please do not tell me this is weird…)

  1. Enable Long path on windows
    1.1 Go to start menu and open Group Policy in Control Panel by searching for “gpedit”

1.2 Go to Local Computer Policy → Administrative Templates → System → Filesystem and edit “Enable Win32 long paths”

1.3 Enable this option

Apply policy change by running this command in a terminal:

gpupdate /target:computer /force

If you are using Git to clone a repository that contains long paths, Git allows you to add a setting to handle them. For that, open a new terminal as admin (I repeat “as admin”), and run:

git config --system core.longpaths true

Hopefully, this helps… until Windows find something more coherent. Why would you disable long paths by default? Unless it is because only Powershell can use it 🙂