Wednesday, October 15, 2008

Sharing iTunes Library (and iPhoto) between local users on a Mac (OS X)

As any married man knows, you need to have separate accounts on your home computers. I'm fairly picky about how my computer is organized and I don't let people messing with it (hmmm... maybe an only-child thing).

At the same time, it's important to be able to share media (particularly music) between accounts for ease of use. If I buy and song on iTunes, Erika should be able to listen to it easily from her account and vice versa. The same with photos.

To that end, I went on a mission configuring the macbook to do exactly this. Here are my findings:

For iTunes:

User A is the iTunes master (ie: the one who actually has the music)
User B is the iTunes slave (ie: the one who will be sharing the music)

  1. Create a new user group call "music" (you can do this from the Account system preferences window). Add User A and User B to the "music" group.

  2. Go to User A's home directory in Finder.

  3. Navigate to /Users/<user_b>/Music/

  4. Set the permissions on iTunes to include read & write access for the "music" group (you can do this via "Get Info" or from the terminal with 'chmod -R g+rw iTunes'.

  5. Next, create an alias to iTunes by hitting Apple-l (lowercase l). That will create a file called "iTunes alias". (NOTE: you must be an admin to do this)

  6. Now log out and log back in as User B

  7. Remove User B's iTunes directory (/Users/<user_b>/Music/iTunes

  8. Now copy the "iTunes alias" file from User A's Music directory to User B's music directory.

  9. Rename the file to just "iTunes". This will fool iTunes into thinking it's library lives in the normal, default location for User B.


Fire up iTunes as User B. The library should be exactly the same as from User A's perspective. Any changes made by User A will be reflected in User B's view and the other way around. This includes purchased music - no authorization required.

For iPhoto:

The process is effectively exactly the same, except instead of using the iTunes directory, you use iPhoto (in Pictures).

No comments: