|
Huntland Services Ltd Tel: +44 (0)1392-490518
|
Setting Namespace Security Programatically
|
|
| Back | ||
|
Using wmimgmt.msc an administrator can modify the permissions on individual namespaces in the CIM Repository. Sometimes it's useful to be able to modify these settings across a number of different systems, remotely and quickly. These two scripts allows an administrator to choose the settings they want and then apply them to a targeted list of computers. Because of the limitations of the scripting interface to Security Descriptors using WMI the mechanism requires an administrator to apply the desired settings to a test namespace, dump these to a file and finally apply them to the required namespace on a list of target machines. Here are the instructions:
Please Note Any kind of activity which makes remote connections and starts altering things is going to be subject to potentail occasional failures - e.g. connection lost. It is therefore possible the modification process is interrupted unexpectedly. A worst case scenario might leave WMI on a target system in a hung or inaccessible state. In my experience this is unusual and easily cured by bouncing WMI or by manually re-setting the security or both. However - BE WARNED! Handling Inheritance Experiment with the myNamespace and myNameSpace\Test1 namespaces to see how inheritance works. If you want to modify the settings of a namespace which has inherited settings you must first modify the parent. In WmiMgmt.msc you can use the Advanced button and edit the user so it's settings are not propagated down to sub namespaces. Then configure the sub namespace as required. Otherwise no matter what you configure will be overwritten by the parent settings. Non-existent Accounts If you take the settings off one machine and apply it to another it is always possible that the first machine's accounts may not be recognised by the second. If so, it doesn't do any damage, the account is simply displayed as 'unknown' and of course is not going to work. Settings that use well known groups (everyone) or domain accounts will not have any problems. Remove 'MyNameSpace' After succesfully deploying your new settings you may want to remove the test namespace. Do this by running Mofcomp.exe Del_MyNameSpace.mof
Please accept the script as is. Feedback will be gratefully accepted at Debug@huntland.co.uk |
||