a6c5ffa8e427a44a3cacc2f4ff1ad9778ba4b75b
[sfrench/samba-autobuild/.git] / docs / docbook / projdoc / PolicyMgmt.sgml
1 <chapter id="PolicyMgmt">
2 <chapterinfo>
3         &author.jht;
4     <pubdate>April 3 2003</pubdate>
5 </chapterinfo>
6 <title>System and Account Policies</title>
7
8 <sect1>
9 <title>Creating and Managing System Policies</title>
10
11 <para>
12 Under MS Windows platforms, particularly those following the release of MS Windows
13 NT4 and MS Windows 95) it is possible to create a type of file that would be placed
14 in the NETLOGON share of a domain controller. As the client logs onto the network
15 this file is read and the contents initiate changes to the registry of the client
16 machine. This file allows changes to be made to those parts of the registry that
17 affect users, groups of users, or machines.
18 </para>
19
20 <para>
21 For MS Windows 9x/Me this file must be called <filename>Config.POL</filename> and may
22 be generated using a tool called <filename>poledit.exe</filename>, better known as the
23 Policy Editor. The policy editor was provided on the Windows 98 installation CD, but
24 dissappeared again with the introduction of MS Windows Me (Millenium Edition). From
25 comments from MS Windows network administrators it would appear that this tool became
26 a part of the MS Windows Me Resource Kit.
27 </para>
28
29 <para>
30 MS Windows NT4 Server products include the <emphasis>System Policy Editor</emphasis>
31 under the <filename>Start -> Programs -> Administrative Tools</filename> menu item.
32 For MS Windows NT4 and later clients this file must be called <filename>NTConfig.POL</filename>.
33 </para>
34
35 <para>
36 New with the introduction of MS Windows 2000 was the Microsoft Management Console
37 or MMC.  This tool is the new wave in the ever changing landscape of Microsoft
38 methods for management of network access and security. Every new Microsoft product
39 or technology seems to obsolete the old rules and to introduce newer and more
40 complex tools and methods. To Microsoft's credit though, the MMC does appear to
41 be a step forward, but improved functionality comes at a great price.
42 </para>
43
44 <para>
45 Before embarking on the configuration of network and system policies it is highly
46 advisable to read the documentation available from Microsoft's web site regarding
47 <ulink url="http://www.microsoft.com/ntserver/management/deployment/planguide/prof_policies.asp">
48 Implementing Profiles and Policies in Windows NT 4.0 from http://www.microsoft.com/ntserver/management/deployment/planguide/prof_policies.asp</ulink> available from Microsoft.
49 There are a large number of documents in addition to this old one that should also
50 be read and understood. Try searching on the Microsoft web site for "Group Policies".
51 </para>
52
53 <para>
54 What follows is a very brief discussion with some helpful notes. The information provided
55 here is incomplete - you are warned.
56 </para>
57
58 <sect2>
59 <title>Windows 9x/Me Policies</title>
60
61 <para>
62 You need the Win98 Group Policy Editor to set Group Profiles up under Windows 9x/Me.
63 It can be found on the Original full product Win98 installation CD under
64 <filename>tools/reskit/netadmin/poledit</filename>.  Install this using the
65 Add/Remove Programs facility and then click on the 'Have Disk' tab.
66 </para>
67
68 <para>
69 Use the Group Policy Editor to create a policy file that specifies the location of
70 user profiles and/or the <filename>My Documents</filename> etc.  stuff. Then
71 save these settings in a file called <filename>Config.POL</filename> that needs to
72 be placed in the root of the [NETLOGON] share. If Win98 is configured to log onto
73 the Samba Domain, it will automatically read this file and update the Win9x/Me registry
74 of the machine as it logs on.
75 </para>
76
77 <para>
78 Further details are covered in the Win98 Resource Kit documentation.
79 </para>
80
81 <para>
82 If you do not take the right steps, then every so often Win9x/Me will check the
83 integrity of the registry and will restore it's settings from the back-up
84 copy of the registry it stores on each Win9x/Me machine. Hence, you will
85 occasionally notice things changing back to the original settings.
86 </para>
87
88 <para>
89 Install the group policy handler for Win9x to pick up group policies. Look on the
90 Win98 CD in <filename>\tools\reskit\netadmin\poledit</filename>.
91 Install group policies on a Win9x client by double-clicking
92 <filename>grouppol.inf</filename>. Log off and on again a couple of times and see
93 if Win98 picks up group policies.  Unfortunately this needs to be done on every
94 Win9x/Me machine that uses group policies.
95 </para>
96
97 </sect2>
98 <sect2>
99 <title>Windows NT4 Style Policy Files</title>
100
101 <para>
102 To create or edit <filename>ntconfig.pol</filename> you must use the NT Server
103 Policy Editor, <command>poledit.exe</command> which is included with NT4 Server
104 but <emphasis>not NT Workstation</emphasis>. There is a Policy Editor on a NT4
105 Workstation but it is not suitable for creating <emphasis>Domain Policies</emphasis>.
106 Further, although the Windows 95 Policy Editor can be installed on an NT4
107 Workstation/Server, it will not work with NT clients. However, the files from
108 the NT Server will run happily enough on an NT4 Workstation.
109 </para>
110
111 <para>
112 You need <filename>poledit.exe, common.adm</filename> and <filename>winnt.adm</filename>.
113 It is convenient to put the two *.adm files in  the <filename>c:\winnt\inf</filename> 
114 directory which is where the binary will look for them unless told otherwise. Note also that that
115 directory is normally 'hidden'.
116 </para>
117
118 <para>
119 The Windows NT policy editor is also included with the Service Pack 3 (and
120 later) for Windows NT 4.0. Extract the files using <command>servicepackname /x</command>,
121 i.e. that's <command>Nt4sp6ai.exe /x</command> for service pack 6a.  The policy editor,
122 <command>poledit.exe</command> and the associated template files (*.adm) should
123 be extracted as well.  It is also possible to downloaded the policy template
124 files for Office97 and get a copy of the policy editor.  Another possible
125 location is with the Zero Administration Kit available for download from Microsoft.
126 </para>
127
128 <sect3>
129 <title>Registry Tattoos</title>
130
131         <para>
132         With NT4 style registry based policy changes, a large number of settings are not
133         automatically reversed as the user logs off. Since the settings that were in the
134         NTConfig.POL file were applied to the client machine registry and that apply to the
135         hive key HKEY_LOCAL_MACHINE are permanent until explicitly reversed. This is known
136         as tattooing. It can have serious consequences down-stream and the administrator must
137         be extremely careful not to lock out the ability to manage the machine at a later date.
138         </para>
139
140
141 </sect3>
142 </sect2>
143 <sect2>
144 <title>MS Windows 200x / XP Professional Policies</title>
145
146 <para>
147 Windows NT4 System policies allows setting of registry parameters specific to
148 users, groups and computers (client workstations) that are members of the NT4
149 style domain. Such policy file will work with MS Windows 2000 / XP clients also.
150 </para>
151
152 <para>
153 New to MS Windows 2000 Microsoft introduced a new style of group policy that confers
154 a superset of capabilities compared with NT4 style policies. Obviously, the tool used
155 to create them is different, and the mechanism for implementing them is much changed.
156 </para>
157
158 <para>
159 The older NT4 style registry based policies are known as <emphasis>Administrative Templates</emphasis>
160 in MS Windows 2000/XP Group Policy Objects (GPOs). The later includes ability to set various security
161 configurations, enforce Internet Explorer browser settings, change and redirect aspects of the
162 users' desktop (including: the location of <emphasis>My Documents</emphasis> files (directory), as
163 well as intrinsics of where menu items will appear in the Start menu). An additional new
164 feature is the ability to make available particular software Windows applications to particular
165 users and/or groups.
166 </para>
167
168 <para>
169 Remember: NT4 policy files are named <filename>NTConfig.POL</filename> and are stored in the root
170 of the NETLOGON share on the domain controllers. A Windows NT4 user enters a username, a password
171 and selects the domain name to which the logon will attempt to take place. During the logon
172 process the client machine reads the NTConfig.POL file from the NETLOGON share on the authenticating
173 server, modifies the local registry values according to the settings in this file.
174 </para>
175
176 <para>
177 Windows 2K GPOs are very feature rich. They are NOT stored in the NETLOGON share, rather part of
178 a Windows 200x policy file is stored in the Active Directory itself and the other part is stored
179 in a shared (and replicated) volume called the SYSVOL folder. This folder is present on all Active
180 Directory domain controllers. The part that is stored in the Active Directory itself is called the
181 group policy container (GPC), and the part that is stored in the replicated share called SYSVOL is
182 known as the group policy template (GPT).
183 </para>
184
185 <para>
186 With NT4 clients the policy file is read and executed upon only aas each user log onto the network.
187 MS Windows 200x policies are much more complex - GPOs are processed and applied at client machine
188 startup (machine specific part) and when the user logs onto the network the user specific part
189 is applied. In MS Windows 200x style policy management each machine and/or user may be subject
190 to any number of concurently applicable (and applied) policy sets (GPOs). Active Directory allows
191 the administrator to also set filters over the policy settings. No such equivalent capability
192 exists with NT4 style policy files.
193 </para>
194
195 <sect3>
196 <title>Administration of Win2K / XP Policies</title>
197
198 <title>Instructions</title>
199 <para>
200 Instead of using the tool called "The System Policy Editor", commonly called Poledit (from the
201 executable name poledit.exe), GPOs are created and managed using a Microsoft Management Console
202 (MMC) snap-in as follows:</para>
203 <procedure>
204
205 <step>
206 <para>
207 Go to the Windows 200x / XP menu <filename>Start->Programs->Administrative Tools</filename>
208         and select the MMC snap-in called "Active Directory Users and Computers"
209 </para>
210 </step>
211
212 <step><para>
213 Select the domain or organizational unit (OU) that you wish to manage, then right click
214 to open the context menu for that object, select the properties item.
215 </para></step>
216
217 <step><para>
218 Now left click on the Group Policy tab, then left click on the New tab. Type a name
219 for the new policy you will create.
220 </para></step>
221
222 <step><para>
223 Now left click on the Edit tab to commence the steps needed to create the GPO.
224 </para></step>
225 </procedure>
226
227 <para>
228 All policy configuration options are controlled through the use of policy administrative
229 templates. These files have a .adm extension, both in NT4 as well as in Windows 200x / XP.
230 Beware however, since the .adm files are NOT interchangible across NT4 and Windows 200x.
231 The later introduces many new features as well as extended definition capabilities. It is
232 well beyond the scope of this documentation to explain how to program .adm files, for that
233 the adminsitrator is referred to the Microsoft Windows Resource Kit for your particular
234 version of MS Windows.
235 </para>
236
237 <note>
238 <para>
239 The MS Windows 2000 Resource Kit contains a tool called gpolmig.exe. This tool can be used
240 to migrate an NT4 NTConfig.POL file into a Windows 200x style GPO. Be VERY careful how you
241 use this powerful tool. Please refer to the resource kit manuals for specific usage information.
242 </para>
243 </note>
244
245 </sect3>
246 </sect2>
247 </sect1>
248
249 <sect1>
250 <title>Managing Account/User Policies</title>
251
252 <para>
253 Policies can define a specific user's settings or the settings for a group of users. The resulting
254 policy file contains the registry settings for all users, groups, and computers that will be using
255 the policy file. Separate policy files for each user, group, or computer are not not necessary.
256 </para>
257
258 <para>
259 If you create a policy that will be automatically downloaded from validating domain controllers,
260 you should name the file NTconfig.POL. As system administrator, you have the option of renaming the
261 policy file and, by modifying the Windows NT-based workstation, directing the computer to update
262 the policy from a manual path. You can do this by either manually changing the registry or by using
263 the System Policy Editor. This path can even be a local path such that each machine has its own policy file,
264 but if a change is necessary to all machines, this change must be made individually to each workstation.
265 </para>
266
267 <para>
268 When a Windows NT4/200x/XP machine logs onto the network the NETLOGON share on the authenticating domain 
269 controller for the presence of the NTConfig.POL file. If one exists it is downloaded, parsed and then
270 applied to the user's part of the registry.
271 </para>
272
273 <para>
274 MS Windows 200x/XP clients that log onto an MS Windows Active Directory security domain may additionally,
275 acquire policy settings through Group Policy Objects (GPOs) that are defined and stored in Active Directory
276 itself. The key benefit of using AS GPOs is that they impose no registry <emphasis>tatooing</emphasis> effect.
277 This has considerable advanage compared with the use of NTConfig.POL (NT4) style policy updates.
278 </para>
279
280 <para>
281 Inaddition to user access controls that may be imposed or applied via system and/or group policies
282 in a manner that works in conjunction with user profiles, the user management environment under
283 MS Windows NT4/200x/XP allows per domain as well as per user account restrictions to be applied.
284 Common restrictions that are frequently used includes:
285 </para>
286
287 <para>
288 <simplelist>
289         <member>Logon Hours</member>
290         <member>Password Aging</member>
291         <member>Permitted Logon from certain machines only</member>
292         <member>Account type (Local or Global)</member>
293         <member>User Rights</member>
294 </simplelist>
295 </para>
296
297 <sect2>
298 <title>With Windows NT4/200x</title>
299
300 <para>
301 The tools that may be used to configure these types of controls from the MS Windows environment are:
302 The NT4 User Manager for domains, the NT4 System and Group Policy Editor, the registry editor (regedt32.exe).
303 Under MS Windows 200x/XP this is done using the Microsoft Managment Console (MMC) with approapriate
304 "snap-ins", the registry editor, and potentially also the NT4 System and Group Policy Editor.
305 </para>
306 </sect2>
307
308 <sect2>
309 <title>With a Samba PDC</title>
310
311 <para>
312 With a Samba Domain Controller, the new tools for managing of user account and policy information includes:
313 <filename>smbpasswd, pdbedit, smbgroupedit, net, rpcclient.</filename>. The administrator should read the
314 man pages for these tools and become familiar with their use.
315 </para>
316
317 </sect2>
318 </sect1>
319
320 <sect1>
321 <title>System Startup and Logon Processing Overview</title>
322
323 <para>
324 The following attempts to document the order of processing of system and user policies following a system
325 reboot and as part of the user logon:
326 </para>
327
328 <orderedlist>
329         <listitem><para>
330         Network starts, then Remote Procedure Call System Service (RPCSS) and Multiple Universal Naming
331         Convention Provider (MUP) start
332         </para></listitem>
333
334         <listitem><para>
335         Where Active Directory is involved, an ordered list of Group Policy Objects (GPOs) is downloaded
336         and applied. The list may include GPOs that:
337 <simplelist>
338         <member>Apply to the location of machines in a Directory</member>
339         <member>Apply only when settings have changed</member>
340         <member>Depend on configuration of scope of applicability: local, site, domain, organizational unit, etc.</member>
341 </simplelist>
342         No desktop user interface is presented until the above have been processed.
343         </para></listitem>
344
345         <listitem><para>
346         Execution of start-up scripts (hidden and synchronous by defaut).
347         </para></listitem>
348
349         <listitem><para>
350         A keyboard action to affect start of logon (Ctrl-Alt-Del).
351         </para></listitem>
352
353         <listitem><para>
354         User credentials are validated, User profile is loaded (depends on policy settings).
355         </para></listitem>
356
357         <listitem><para>
358         An ordered list of User GPOs is obtained. The list contents depends on what is configured in respsect of:
359
360 <simplelist>
361         <member>Is user a domain member, thus subject to particular policies</member>
362         <member>Loopback enablement, and the state of the loopback policy (Merge or Replace)</member>
363         <member>Location of the Active Directory itself</member>
364         <member>Has the list of GPOs changed. No processing is needed if not changed.</member>
365 </simplelist>
366         </para></listitem>
367
368         <listitem><para>
369         User Policies are applied from Active Directory. Note: There are several types.
370         </para></listitem>
371
372         <listitem><para>
373         Logon scripts are run. New to Win2K and Active Directory, logon scripts may be obtained based on Group
374         Policy objects (hidden and executed synchronously). NT4 style logon scripts are then run in a normal
375         window.
376         </para></listitem>
377
378         <listitem><para>
379         The User Interface as determined from the GPOs is presented. Note: In a Samba domain (like and NT4
380         Domain) machine (system) policies are applied at start-up, User policies are applied at logon.
381         </para></listitem>
382 </orderedlist>
383
384 </sect1>
385 </chapter>