Sometimes in may become necessary to restrict access to local resources to certain users on a given workstation. In the past, NetInfo was the easiest way of accomplishing that finite control. Now with 10.5, that tool is no longer available, but has been replaced with the ever-popular dscl.
Recently I acquired a 10.5 machine for my two kids, and it became necessary to lock their access to the CD-ROM (since they broke the one on the 10.3 machine). Using some of the information I've gathered in the past from this site, I managed to put together the necessary command line arguments to lock that access. Read on for my solution.
Here's what I did:
dscl . -read /Users/kids mcx_settings > /mcx_settings.txt <key>ProhibitEject</key>
<true/>
Save and close the text file.$ mcx_set=`cat"$basepath"/mcx_settings.txt`
$ mcx_flags=`cat"$basepath"/mcx_flags.txt`
$ sudo dscl . -create /Users/kids "mcx_flags" "${mcx_flags}"
$ sudo dscl . -create /Users/kids "mcx_settings" "${mcx_set}"
Note: The top two commands use back quotes and not single quotes, which can trip you up depending on the font you're reading this in.Mac OS X Hints
http://hints.macworld.com/article.php?story=20080111162422869