Solution

If Apple Notes stop syncing

Has it ever happened to you that Apple’s Notes just stopped syncing reliably via iCloud?

For me it happens like this: the Mac stops uploading local changes to some notes to iCloud, so I don’t see them on my phone. I know that the problem is really in uploading from the Mac because the web version of iCloud continues to sync normally with my iPhone. Also, the new notes that I create on the phone, appear on my Mac.

You may have found several fix suggestions online, most futile. Signing off iCloud and then signing back on helps, but this way you lose all the local changes that haven’t been uploaded to iCloud.

What I’ve found to be a working and safe solution is to select the “All iCloud” folder in Notes, then sort notes by date changed, then move all the notes that hadn’t been uploaded to iCloud to the “On My Mac” account (you must enable it in Preferences) and then move them back to the iCloud account.

2017   Mac   solution

Fix sudo on a Mac

Sometimes the sudo command stops working for reasons beyond human understanding. When you try to sudo anything, it says: “no valid sudoers sources found”.

It happened to me twice. The first time it happened to a MacBook. I tried to make some changes to the sudoers file, but it didn’t help, and I gave up. After adding an SSD drive to my Mac Pro and moving the system to it, it happened again. Mac Pro is my main working machine, so I had to fix it this time.

Turned out the problem was with the permissions on the root directory. Presumably I’ve somehow broken them while moving my system.

I found a working solution on MacRumors forum. Here’s what you do:

  1. Restart your Mac is a single-user mode (press and hold ⌘+S during boot until you see command prompt).
  2. /sbin/fsck -fy
    check the filesystem integrity (not sure it’s necessary, but I did it anyway).
  3. /sbin/mount -wu /
    mount the root filesystem.
  4. /bin/chmod 1775 /
    fix the permissions.
  5. /bin/sync
    commit the changes to filesystem.
  6. exit

After booting to the normal Mac environment, you may also need to repair permissions with the Disk Utility.

2012   Mac   solution