Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Clone Parental Control settings with Apple Remote Desktop System
The key to cloning parental controls with ARD is niutil, the command line utility for netinfo. This works for Tiger (and probably Panther), but will not work in Leopard as Apple has finally banished netinfo from Leopard.

Read on for the how-to...

Here's how to do the cloning...
  1. Set the parental controls in the normal manner (System Preferences » Accounts » Parental Controls) on the donor machine.
  2. On the ARD admin machine, select the donor machine and send this Unix command /usr/bin/niutil -readprop . /users/student mcx_settings, where student is the account with the parental controls; execute as root and be sure to display all output.
  3. Select the plist in the ARD results window. Use Command-A to select all, then place the cursor in front of the first line of the plist, hold down shift, and click. Copy the plist.
  4. Create a new document in a text editor that preserves the UTF-8 coding with the contents of the clipboard (the plist). I recommend the free TextWrangler from Bare Bones Software.
  5. Add these two lines at the beginning of the file:
      #!/bin/bash
      mcx_var=$(cat  <<'EndOfParameter'
  6. Add these two lines to the end of the file:
      EndOfParameter)
      /usr/bin/niutil -createprop . /users/student mcx_settings "$mcx_var"
    Again, student is the account to be set.
  7. Save the file in a convenient spot and make it executable (e.g., chmod 740 thescript).
The file is now a shell script to replace the parental controls on the machine where it is executed. Ideally, one would paste this into the Send Unix Command window of ARD and blast it out to the desired machines. This fails in my tests with ARD2. Some alternatives:
  • Copy the script to a convenient spot on the target machine and execute it there. Unfortunately, this leaves the script on the target; it should be deleted, but at least one could do the copy, execute, delete on multiple machines at once with ARD.
  • Use a flash drive or other portable storage device and execute on each target machine. This requires physically visiting each machine, but leaves no mess to be cleaned up.
  • On each target machine, mount a server that has the script, execute the script, and then dismount the server. This is my preferred method; details follow.
Place the script in a convenient location on the server. A simple approach is to use your ARD admin machine as a server: just turn on Personal File Sharing (System Preferences » Sharing), but there is a limit of 10 simultaneous connections.

In ARD, select the target machines and send these shell commands (execute as root):
  $ mkdir /Volumes/tmpserver/
  $ mount -t afp afp://admin:password@server/admin /Volumes/tmpserver/
  $ /Volumes/tmpserver/Documents/thescript
  $ umount -f /Volumes/tmpserver/
Use the appropriate username (I've shown admin) and password, and use either the URL or the IP address of your server machine. This creates the mountpoint (/Volumes/tmpserver/), mounts the server on it, executes the script, then unmounts the server. In this example, the mountpoint is created in the /Volumes directory, and the script has been put in the Documents folder of the admin account (and is named thescript).

You're putting in the admin account password, but ARD encrypts its transmissions (be careful if you save this as an ARD task). If you don't otherwise want file sharing on, turn it off after you're done with this procedure.

Note: There is a section in this same plist to lock the dock; insert or remove it to lock/unlock the dock.
    •    
  • Currently 1.57 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[17,714 views]  

Clone Parental Control settings with Apple Remote Desktop | 1 comments | Create New Account
Click here to return to the 'Clone Parental Control settings with Apple Remote Desktop' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Clone Parental Control settings with Apple Remote Desktop
Authored by: roodavis on Sep 03, '09 08:33:09AM
I was able to use dscl to duplicate this action on Leopard clients. Instructions can be found here:

http://applehelp.org/ARD_local_managed.html

Hope this helps.

Rick Davis

[ Reply to This | # ]