Monday, April 7, 2014

Stopping Adobe flash upgrade from launching a browser tab has interesting side effect - Can no longer click on links in emails

After updating adobe recently, I was annoyed when it launched a browser tab to inform me that, yes, the update had succeeded. Of course, programs use this tactic these days to get around the common habit of otherwise blocking this renegade attempts to "phone home". But... it's quite problematic to stop a program launching a tab in your browser.
So after some web searching and seeing a few tales from others trying to achieve the same thing, I was eventually drawn to a comment by a user who said;
You're making it too complicated - just set the default browser to a browser you don't use and block that.
Interesting angle, but still problematic if you don't have sufficient firewall control. On my mac, I could turn on the built-in firewall, but that's really only about blocking inbound connections. I've used ipfw before, and it's great for what it does, but it doesn't do application specific blocks the way that most firewall applications on Windows can. And I didn't want to foray into the world of custom firewalls for mac - I find they often promise a lot, but deliver little, and gave up on them long ago.
So what to do?
One suggestion was to install a little used browser and then move the exe preventing execution. Not bad, but oh so much fiddling just for a simple task.
I poked about the Safari settings anyway and suddenly realised I could set the default browser to any application I like. I tried setting it to MacVim, which was fun when MacVim complained about not understanding the protocol. Nearly, but too messy.
So I tried setting it to TextEdit. Bingo! Now we were cooking.
I gave it a test run:
  • "run http://www.google.com" --- fires up TextEdit but doesn't actually do anything else
  • "run some_file.html" --- contents of some_file.html end up in TextEdit
I could live with that. Let's see Adobe flash upgrade launch it's little phone-home browser tab now!
As a bonus (depending on how you look at it), I stumbled a little today when I couldn't open a link in an email. I scratched my head for a little while until I finally remembered that I'd disabled that baby!. Oh, I'll just cut and paste. How about that - I can't click links in emails. Maybe I should set it up this way on my family and friends machines too! :)

Tuesday, February 11, 2014

Getting admin access to mac with knowing the current password

Worth repeating

Change the password in single user mode
  1. Hold ⌘S on startup
  2. mount -uw / (fsck -fy is not needed)
  3. launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist (or /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist in 10.6)
  4. dscl . passwd /Users/username (without a trailing slash) and enter a new password. You can ignore the error about com.apple.DirectoryServices.plist.
  5. reboot
Create a new admin account
  1. Hold ⌘S on startup
  2. mount -uw / (fsck -fy is not needed)
  3. rm /var/db/.AppleSetupDone
  4. reboot
  5. Go through the steps of creating a new account. You can leave all fields in the personal information step blank
  6. After logging in on the new account, go to the Users & Groups preference pane
  7. Select the old account, press the Reset Password... button, and enter a new password
Restart and enter Recovery mode (for 10.7 Lion and newer OS only)
  1. Hold ⌘R on startup
  2. Open Terminal from the Utilities menu
  3. Type resetpassword and follow the instructions

Monday, January 20, 2014

Management

Any network systems management setup that dumps so much raw data on administrators that they need big-data analytics to sift through it for answers is fundamentally flawed - Shmuel Kliger