Anonymous SMB sharing from OS X Lion (10.7)

Sharing a folder via SMB (the so called Windows Sharing) with OS X is easy. But username and password were always required. I wanted to make an anonymous share and didn't know how.

Sharing is done like this:

One can see the Everyone user added and still a password was required to log in. Accidentally I found the fix for that.

I had to enable the guest user for file sharing:

That's it. Problem solved.

NOTE: The guest user is disabled by default in OS X Lion. You'll have to enable it first.

Time machine is not perfect! A mobile backup solution for OS X

There's this rule that drives fail and stuff must be backed up.

My main operating system is Apple's OS X. OS X has a backup infrastructure called Time Machine. Time Machine is a way to do a version control on the whole file system. In layman's terms: if you delete a file, you will have a version saved. Or if you mess up a document, you can recover an old version from the Time Machine. This is how the interface looks:

Also if you mess up the OS by installing something stupid, you can recover the whole OS to a state that was for example 1 hour ago. A week ago I had to test this option, because by accident I destroyed some virtual network interfaces and was too lazy to try to fix them manually. This requires an installation cd and then the whole hdd is restored. 120 gb in 50 minutes. I thought it could figure out what to reverse and do it faster without an installation cd, but I guess this is how stuff works. It worked perfectly however.

I have a Time Machine router from Apple. It's a router with a hdd inside it. Backup/restore happens via wi-fi. It works perfectly.

Note: when restoring the whole hdd to an old state, you should link the laptop and the router with a cable. This cuts the restore time in half (10 mb/s on wi-fi, 20 mb/s with cable).

Drawbacks: when a drive fails, I need an installation cd, new hdd, screwdrivers to change the drive and a lot of time for the restore operation (1 hour in my case). This solution is not mobile. The router is big, so I can't take it with me on the road.

Why would I want to have a mobile backup solution?

Well, I have an SSD drive. They tend to fail quite often and without warning. What would happen if I have work abroad and need a laptop and drive that sould not fail, or at least have a backup option? Should I bring a spare hdd, screwdriver, installation cd and the bulky router?

The mobile backup solution

No, there's a better option. Use a drive-cloning software that clones the whole SSD to an external HDD via usb for example. If the SSD fails, I don't even have to change the drives. OS X can boot from the USB drive easily, so I don't need a screwdriver. No downtime, no 1 hour restoration. Just reboot and the new drive kicks in. Well, it's not going to be as fast as the SSD:

I have a 120gb SSD with a 750 gb HDD for a mobile backup. The backup is 120gb, 200gb if I want some history of the most changed files (yes, the software can even do versioning and incremental backup). What should I do with the rest? Split the drive and have some extra space. Now I have a mobile backup with enough space to bring a ton of music or TED hd lectures.

The two softwares I know that can do that are Carbon Copy Cloner (ccc) and SuperDuper! (yes, the exclamation mark is part of the name). CCC is free, that's what I use. Easy to setup. I did all in an hour. I even rebooted to see whether the backup drive would work. It worked like a charm. It copies with around ~30mb/s.

I have not tested SuperDuper!, but it has great reviews, especially the support, they say, is awesome.

Review: mplayer

Mplayer is the best media player there is. It just is. One just downloads it and it just works, no codecs installation, no registry shit, nothing. It can navigate with the arrow keys (up/down, left/right, pgup/pgdn), it can open unfinished downloads, and can repair/redo their index and navigate while the file is still downloading - awesome. It's very lightweight.

It can play almost anything, no matter how broken it is. It comes with a console tool called mencoder that can encode stuff. It's very hard to use, but it works. It has a GUI for windows and mac os x.

The problem is that the development is a bit forsaken. Sometimes the GUI crashes, there a few bugs, the integration with the OS is not that perfect (I had issues with Vista effects and Mac OS X graphics cards switching)

I just found that the MplayerX (+GUI) is available in the App Store, perfect. The GUI is very slick.

Verdict: highly recommended.

Installing PostgreSQL 8.4.x (8.4.8-1) and 9.x (9.0.4-1) on OS X Lion with EnterpriseDB installer (fix)

Postgres for Mac OS X has three install options:

  1. Using a package management system. Fink, MacPorts and Homebrew all have it. I've tried only MacPorts and it works fine.
  2. Manually downloading and compiling it.
  3. Using EntrepriseDB's installer. It can be found here.
Options 1) and 2) require Xcode. Xcode is a large development package for OS X. It installs an IDE, compilers and unix tools. Options 1) and 2) use the unix tools.
I don't want to install Xcode, even though there is a way to limit it's memory footprint. Here's how (the question was with negative rating when I found it, but the answer is useful).
Anyway I don't want to install Xcode, and on my last OS X I only installed a couple of databases. That made the whole ports thing a bit useless.
So I tried the EnterpriseDB's installer. It failed with
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
The official sites said: Lion is not yet supported: link. I didn't want to install some package management solution so I wanted a solution.
I found one here. On a poker site - kill me now. It seems to be the easiest one. Just create a postgres user using the Users & Groups preference tab. Don't create a Sharing only user, it doesn't work with it - I tried. Create a normal user. Everything works like a charm:
I tried the new postgres 9.0.4, but it failed with "invalid stream header: BB656430" when serving binary data from an import from 8.4.x. I went back to 8.4.x.
EntrepriseDB's installer creates an uninstaller, installs pgAdmin, works nice. User-friendly.