Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Scripting ARD/Automator UNIX commands with wildcard folder names

Hello all and thanks in advance -


I am a teacher and defacto IT admin at a school and trying to solve how to clone parental control settings effectively. I am trying to write this unix command that I can create as a service in automator to be able to execute to any remote machine.


dscl . -mcximport /Users/techmacXXX /Users/administrator/parental_settings.plist


The user names from the target computers are long form Tech Mac XXX (using numbers 101-154) or Design Lab 1-26. The short forms are similarlytechmac101, designlab22, etc. I have an administrator account on each machine using the same name.


Using /Users/techmac* does not work, however much I feel as though it should, and I cannot find any information as to how to script using wildcards that DOESNT just suggest an asterisk. Right now I can run the command manually for each machine but that's quite a headache (though better than the previous situation of manually editing w/ sysprefs.


It would be amazing if I could have the automator catch the shortform of the current user (the machines will always be logged in the student accounts) and input that into the above command. That way I could just copy the new .plist to the remote machines, and run the UNIX command on any and all at once.


All the machines are Lion 10.7.2 and I am using Lion 10.7.3


I appreciate the wise counsel of the forum. Thanks for any assistance!

Apple Remote Desktop-OTHER, Mac OS X (10.7.3)

Posted on Feb 29, 2012 2:08 PM

Reply
Question marked as Best reply

Posted on Feb 29, 2012 9:43 PM

Are these accounts created locally on the comptuer are are they coming from a directory server like an active directory and or open directory?


Have you considered applying the MCX to the computer, a user group or computer group? (instead of a specific user account)

3 replies

Mar 1, 2012 4:59 AM in response to TeenTitan

TeenTitan! to save the day again. You helped me out once before.


The accounts are created locally. This was originally because I didn't have access to the servers and I needed to set the lab up asap. Since then I've gotten access and would be able to manage via the network but there were a few factors to consider.


I know you can do something called Local (Managed) accounts where the account is really a local account but managed by the server. We have OpenDirectory i believe, and our server runs Snow Leopard. I've got a diradmin login to the workgroup manager so I can do what I have to do. But I have NOT been able to find instructions on how to sync a local account as a Local Managed, only converting it to network. I don't especially want to do network accounts because the machines were set up last year this way, we run on wireless and too often the network would hiccup or whatever and the computers would freeze or otherwise be unusable for minutes at a time, highly annoying. Anyway, if you think this Local (Managed) situation would be the easiest way to manage parental controls and can help me out a little with that, i am all for it.


As far as using MCX - i don't really know all the features of this command, I found that snippet of code on here. I did read some webpage describing MCX but I didn't take away that there was a method to apply it to a whole computer at once, it seemed like it required users. This seems logical - I have a single Administrator account and a single User account (of the format I described) on every machine. Can you describe how this would work?


Titan thanks so much for your assistance!

Mar 2, 2012 7:01 PM in response to marchitectura

This article looks like a way to copy parental controls to a local user. So you just make a local user on every machine (which can be done via unix also - but another story), make one parentally controlled like you want, and then do this procedure to make them all alike via ARD using pretty much the dscl command you have. You need each local user to have the same name.


http://applehelp.org/ARD_local_managed.html


I found this in another thread here https://discussions.apple.com/thread/3107013?answerId=17714031022#17714031022&ac_cid=142432#17714031


Then it shouldn't be too hard if you need to add an app to the "my applications" part.


I have not done this yet, but plan to try it next time I want to change the parental control setup of the local student user on our lab machines.


good luck.

Scripting ARD/Automator UNIX commands with wildcard folder names

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.