ControlPlane, Time Machine and multiple profiles

Recently I linked to Nick Schmidt’s piece on using ControlPlane to switch Time Machine profiles (http://geekyschmidt.com/2011/12/29/dual-time-machine-wielding-backups).  There was one thing that Nick missed that is important on the OS X side and that is that tmutil may require you to use sudo in order to use the tmutil setdestination command.  ControlPlane doesn’t currently allow you to directly call tmutil with administrative privileges.  To get around this you can change how sudo is configured on your system so that the tmutil command can be run with administrative privileges and not require a password to do so.

First, open a terminal window and issue the following command

sudo visudo

Visudo opens the sudo config file in the vim text editor.  If you’re not familiar with vim, I’ll explain in detail how to edit the file so that tmutil can be run without a password.

  1. Use the arrow keys to find this line
    %admin  ALL=(ALL) ALL
  2. Press and hold shift, and then a, release shift.  This will put your curser at the end of the line.  Add the following:
    , NOPASSWD: /usr/bin/tmutil
  3. The line should now look like this:
    %admin  ALL=(ALL) ALL, NOPASSWD: /usr/bin/tmutil
  4. Press escape and type the following:
    :wq
  5. Press enter.

That’s it.  ControlPlane will now be able to run sudo tmutil without requiring your password each time.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>