Typo fix.
[bbaumbach/samba-autobuild/.git] / docs / Samba-HOWTO-Collection / ProfileMgmt.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3                 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4   <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
5   %global_entities;
6 ]>
7 <chapter id="ProfileMgmt">
8 <chapterinfo>
9         &author.jht;
10     <pubdate>April 3 2003</pubdate>
11 </chapterinfo>
12
13 <title>Desktop Profile Management</title>
14
15 <sect1>
16 <title>Features and Benefits</title>
17
18 <para>
19 Roaming profiles are feared by some, hated by a few, loved by many, and a Godsend for
20 some administrators.
21 </para>
22
23 <para>
24 Roaming profiles allow an administrator to make available a consistent user desktop
25 as the user moves from one machine to another. This chapter provides much information
26 regarding how to configure and manage roaming profiles.
27 </para>
28
29 <para>
30 While roaming profiles might sound like nirvana to some, they are a real and tangible
31 problem to others. In particular, users of mobile computing tools, where often there may not
32 be a sustained network connection, are often better served by purely local profiles.
33 This chapter provides information to help the Samba administrator deal with those
34 situations.
35 </para>
36
37 </sect1>
38
39 <sect1>
40 <title>Roaming Profiles</title>
41
42 <warning>
43 <para>
44 Roaming profiles support is different for Windows 9x/Me and Windows NT4/200x.
45 </para>
46 </warning>
47
48 <para>
49 Before discussing how to configure roaming profiles, it is useful to see how
50 Windows 9x/Me and Windows NT4/200x clients implement these features.
51 </para>
52
53 <para>
54 Windows 9x/Me clients send a NetUserGetInfo request to the server to get the user's
55 profiles location. However, the response does not have room for a separate
56 profiles location field, only the user's home share. This means that Windows 9x/Me
57 profiles are restricted to being stored in the user's home directory.
58 </para>
59
60
61 <para>
62 Windows NT4/200x  clients send a NetSAMLogon RPC request, which contains many fields
63 including a separate field for the location of the user's profiles.
64 </para>
65
66 <sect2>
67 <title>Samba Configuration for Profile Handling</title>
68
69 <para>
70 This section documents how to configure Samba for MS Windows client profile support.
71 </para>
72
73 <sect3>
74 <title>NT4/200x User Profiles</title>
75
76 <para>
77 For example, to support Windows NT4/200x clients, set the following in the [global] section of the &smb.conf; file:
78 </para>
79
80 <para>
81 <smbconfblock>
82 <smbconfoption><name>logon path</name><value> </value></smbconfoption>
83 <member><parameter>\\profileserver\profileshare\profilepath\%U\moreprofilepath</parameter></member>
84 </smbconfblock>
85
86 This is typically implemented like:
87
88 <smbconfblock>
89 <smbconfoption><name>logon path</name><value>\\%L\Profiles\%u</value></smbconfoption>
90 </smbconfblock>
91 where <quote>%L</quote> translates to the name of the Samba server and <quote>%u</quote> translates to the user name.
92 </para>
93
94 <para>
95 The default for this option is <filename>\\%N\%U\profile</filename>, namely <filename>\\sambaserver\username\profile</filename>. 
96 The <filename>\\%N\%U</filename> service is created automatically by the [homes] service. If you are using
97 a Samba server for the profiles, you must make the share that is specified in the logon path
98 browseable. Please refer to the man page for &smb.conf; in respect of the different
99 semantics of <quote>%L</quote> and <quote>%N</quote>, as well as <quote>%U</quote> and <quote>%u</quote>.
100 </para>
101
102 <note>
103 <para>
104 MS Windows NT/200x clients at times do not disconnect a connection to a server between logons. It is recommended
105 to not use the <smbconfsection>homes</smbconfsection> meta-service name as part of the profile share path.
106 </para>
107 </note>
108 </sect3>
109
110 <sect3>
111 <title>Windows 9x/Me User Profiles</title>
112
113 <para>
114 To support Windows 9x/Me clients, you must use the <smbconfoption><name>logon home</name></smbconfoption>
115 parameter. Samba has been fixed so <userinput>net use /home</userinput> now works as well and it, too, relies
116 on the <command>logon home</command> parameter.
117 </para>
118
119 <para>
120 By using the logon home parameter, you are restricted to putting Windows 9x/Me profiles in the user's home
121 directory.  But wait! There is a trick you can use. If you set the following in the
122 <smbconfsection>[global]</smbconfsection> section of your &smb.conf; file:
123 </para>
124 <para><smbconfblock>
125 <smbconfoption><name>logon home</name><value>\\%L\%U\.profiles</value></smbconfoption>
126 </smbconfblock></para>
127
128 <para>
129 then your Windows 9x/Me clients will dutifully put their clients in a subdirectory
130 of your home directory called <filename>.profiles</filename> (making them hidden).
131 </para>
132
133 <para>
134 Not only that, but <userinput>net use /home</userinput> will also work because of a feature in
135 Windows 9x/Me. It removes any directory stuff off the end of the home directory area
136 and only uses the server and share portion. That is, it looks like you
137 specified <filename>\\%L\%U</filename> for <smbconfoption><name>logon home</name></smbconfoption>.
138 </para>
139 </sect3>
140
141 <sect3>
142 <title>Mixed Windows 9x/Me and Windows NT4/200x User Profiles</title>
143
144 <para>
145 You can support profiles for Windows 9x and Windows NT clients by setting both the
146 <smbconfoption><name>logon home</name></smbconfoption> and <smbconfoption><name>logon path</name></smbconfoption> parameters. For example:
147 </para>
148
149 <para><smbconfblock>
150 <smbconfoption><name>logon home</name><value>\\%L\%u\.profiles</value></smbconfoption>
151 <smbconfoption><name>logon path</name><value>\\%L\profiles\%u</value></smbconfoption>
152 </smbconfblock></para>
153
154 </sect3>
155 <sect3>
156 <title>Disabling Roaming Profile Support</title>
157
158 <para>
159 A question often asked is: <quote>How may I enforce use of local profiles?</quote> or
160 <quote>How do I disable roaming profiles?</quote>
161 </para>
162
163 <para>
164 <indexterm><primary>roaming profiles</primary></indexterm>
165 There are three ways of doing this:
166 <indexterm><primary>windows registry settings</primary><secondary>roaming profiles</secondary></indexterm>
167 </para>
168
169
170 <variablelist>
171         <varlistentry>
172                 <term>In &smb.conf;</term>
173                 <listitem><para>
174                 Affect the following settings and ALL clients will be forced to use a local profile:
175                 <smbconfoption><name>logon home</name><value> </value></smbconfoption> and <smbconfoption><name>logon path</name><value> </value></smbconfoption>
176                 </para>
177
178                 <para>
179                 The arguments to these parameters must be left blank. It is necessary to include the <constant>=</constant> sign
180                 to specifically assign the empty value.
181                 </para></listitem>
182         </varlistentry>
183
184         <varlistentry>
185                 <term>MS Windows Registry</term>
186                 <listitem><para>
187                 By using the Microsoft Management Console gpedit.msc to instruct your MS Windows XP
188                 machine to use only a local profile. This, of course, modifies registry settings. The full
189                 path to the option is:
190 <screen>
191 Local Computer Policy\
192         Computer Configuration\
193                 Administrative Templates\
194                         System\
195                                 User Profiles\
196
197 Disable: Only Allow Local User Profiles 
198 Disable: Prevent Roaming Profile Change from Propagating to the Server
199 </screen>
200         </para> </listitem>
201         </varlistentry>
202
203         <varlistentry>
204                 <term>Change of Profile Type:</term>
205                 <listitem><para>From the start menu right-click on <guiicon>My Computer icon</guiicon>,
206                 select <guimenuitem>Properties</guimenuitem>, click on the <guilabel>User Profiles</guilabel>
207                 tab, select the profile you wish to change from
208                 <guimenu>Roaming</guimenu> type to <guimenu>Local</guimenu>, and click on
209                 <guibutton>Change Type</guibutton>.
210                 </para></listitem>
211         </varlistentry>
212 </variablelist>
213
214 <para>
215 Consult the MS Windows registry guide for your particular MS Windows version for more information
216 about which registry keys to change to enforce use of only local user profiles.
217 </para>
218
219 <note><para>
220 The specifics of how to convert a local profile to a roaming profile, or a roaming profile
221 to a local one vary according to the version of MS Windows you are running. Consult the Microsoft MS
222 Windows Resource Kit for your version of Windows for specific information.
223 </para></note>
224
225 </sect3> </sect2>
226
227 <sect2> <title>Windows Client Profile Configuration Information</title>
228
229 <sect3> <title>Windows 9x/Me Profile Setup</title>
230
231 <para>
232 When a user first logs in on Windows 9X, the file user.DAT is created, as are folders
233 <filename>Start Menu</filename>, <filename>Desktop</filename>, <filename>Programs</filename>, and
234 <filename>Nethood</filename>. These directories and their contents will be merged with the local
235 versions stored in <filename>c:\windows\profiles\username</filename> on subsequent logins, taking the
236 most recent from each.  You will need to use the <smbconfsection>[global]</smbconfsection> options
237 <smbconfoption><name>preserve case</name><value>yes</value></smbconfoption>,
238 <smbconfoption><name>short preserve case</name><value>yes</value></smbconfoption> and
239 <smbconfoption><name>case sensitive</name><value>no</value></smbconfoption>
240 in order to maintain capital letters in shortcuts in any of the profile folders.
241 </para>
242
243 <para>
244 The <filename>user.DAT</filename> file contains all the user's preferences. If you wish to enforce a set of preferences,
245 rename their <filename>user.DAT</filename> file to <filename>user.MAN</filename>, and deny them write access to this file.
246 </para>
247
248 <orderedlist>
249         <listitem> <para>
250         On the Windows 9x/Me machine, go to <guimenu>Control Panel</guimenu> ->
251         <guimenuitem>Passwords</guimenuitem> and select the <guilabel>User Profiles</guilabel> tab.
252         Select the required level of roaming preferences. Press <guibutton>OK</guibutton>, but do not
253         allow the computer to reboot.
254         </para> </listitem>
255
256         <listitem> <para>
257         On the Windows 9x/Me machine, go to <guimenu>Control Panel</guimenu> ->
258         <guimenuitem>Network</guimenuitem> -> <guimenuitem>Client for Microsoft Networks</guimenuitem>
259         -> <guilabel>Preferences</guilabel>. Select <guilabel>Log on to NT Domain</guilabel>.   Then,
260         ensure that the Primary Logon is <guilabel>Client for Microsoft Networks</guilabel>. Press
261         <guibutton>OK</guibutton>, and this time allow the computer to reboot.
262         </para> </listitem>
263 </orderedlist>
264
265 <para> Under Windows 9x/ME, profiles are downloaded from the Primary Logon. If you have the Primary Logon
266 as <quote>Client for Novell Networks</quote>, then the profiles and logon script will be downloaded from
267 your Novell Server. If you have the Primary Logon as <quote>Windows Logon</quote>, then the profiles will
268 be loaded from the local machine &smbmdash; a bit against the concept of roaming profiles, it would seem!  </para>
269
270 <para>
271 You will now find that the Microsoft Networks Login box contains <constant>[user, password, domain]</constant> instead
272 of just <constant>[user, password]</constant>. Type in the Samba server's domain name (or any other domain known to exist,
273 but bear in mind that the user will be authenticated against this domain and profiles downloaded from it,
274 if that domain logon server supports it), user name and user's password. 
275 </para>
276
277 <para> Once the user has been successfully validated, the Windows 9x/Me machine will inform you that
278 <computeroutput>The user has not logged on before</computeroutput> and asks you <computeroutput>Do you
279 wish to save the user's preferences?</computeroutput> Select <guibutton>Yes</guibutton>. </para>
280
281 <para> Once the Windows 9x/Me client comes up with the desktop, you should be able to examine the
282 contents of the directory specified in the <smbconfoption><name>logon path</name></smbconfoption> on
283 the Samba server and verify that the <filename>Desktop</filename>, <filename>Start Menu</filename>,
284 <filename>Programs</filename> and <filename>Nethood</filename> folders have been created. </para>
285
286 <para> These folders will be cached locally on the client, and updated when the user logs off (if
287 you haven't made them read-only by then). You will find that if the user creates further folders or
288 shortcut, that the client will merge the profile contents downloaded with the contents of the profile
289 directory already on the local client, taking the newest folders and shortcut from each set.    </para>
290
291 <para> If you have made the folders/files read-only on the Samba server, then you will get errors from
292 the Windows 9x/Me machine on logon and logout as it attempts to merge the local and remote profile.
293 Basically, if you have any errors reported by the Windows 9x/Me machine, check the UNIX file permissions
294 and ownership rights on the profile directory contents, on the Samba server. </para>
295
296 <para> If you have problems creating user profiles, you can reset the user's local desktop cache, as
297 shown below. When this user next logs in, the user will be told that he/she is logging in <quote>for
298         the first time</quote>.
299         
300 <indexterm><primary>windows registry settings</primary><secondary>profile path</secondary></indexterm>
301         </para>
302
303
304 <orderedlist>
305         <listitem><para>
306         Instead of logging in under the [user, password, domain] dialog, press <guibutton>escape</guibutton>.
307         </para> </listitem>
308
309         <listitem><para>
310         Run the <command>regedit.exe</command> program, and look in:
311         </para>
312
313         <para>
314         <filename>HKEY_LOCAL_MACHINE\Windows\CurrentVersion\ProfileList</filename>
315         </para>
316
317         <para>
318         You will find an entry for each user of ProfilePath.    Note the contents of this key
319         (likely to be <filename>c:\windows\profiles\username</filename>), then delete the key
320         <parameter>ProfilePath</parameter> for the required user.
321         </para></listitem>
322
323         <listitem><para>
324         Exit the registry editor.
325         </para></listitem>
326
327         <listitem><para>
328         Search for the user's .PWL password-caching file in the <filename>c:\windows</filename> directory, and delete it.
329         </para></listitem>
330
331         <listitem><para>
332         Log off the Windows 9x/Me client.
333         </para></listitem>
334
335         <listitem><para>
336         Check the contents of the profile path (see <smbconfoption><name>logon path</name></smbconfoption>
337         described above) and delete the <filename>user.DAT</filename> or <filename>user.MAN</filename>
338         file for the user, making a backup if required. 
339         </para></listitem>
340 </orderedlist>
341
342 <warning><para>
343 Before deleting the contents of the directory listed in the <parameter>ProfilePath</parameter>
344 (this is likely to be <filename>c:\windows\profiles\username)</filename>, ask the owner if they have
345 any important files stored on their desktop or in their start menu. Delete the contents of the
346 directory <parameter>ProfilePath</parameter> (making a backup if any of the files are needed).
347 </para>
348
349 <para>
350 This will have the effect of removing the local (read-only hidden system file) <filename>user.DAT</filename>
351 in their profile directory, as well as the local <quote>desktop,</quote> <quote>nethood,</quote>
352 <quote>start menu,</quote> and <quote>programs</quote> folders.
353 </para></warning>
354
355 <para>
356 If all else fails, increase Samba's debug log levels to between 3 and 10, and/or run a packet
357 sniffer program such as ethereal or <command>netmon.exe</command>, and look for error messages.
358 </para>
359
360 <para> If you have access to an Windows NT4/200x server, then first set up roaming profiles and/or
361 netlogons on the Windows NT4/200x server. Make a packet trace, or examine the example packet traces
362 provided with Windows NT4/200x server, and see what the differences are with the equivalent Samba trace.
363 </para>
364
365 </sect3>
366
367 <sect3>
368 <title>Windows NT4 Workstation</title>
369
370 <para> When a user first logs in to a Windows NT Workstation, the profile NTuser.DAT is created. The profile
371 location can be now specified through the <smbconfoption><name>logon path</name></smbconfoption> parameter.
372 </para>
373
374 <para> There is a parameter that is now available for use with NT Profiles: <smbconfoption><name>logon drive</name></smbconfoption>. 
375 This should be set to <filename>H:</filename> or any other drive, and should be used in conjunction with
376 the new <smbconfoption><name>logon home</name></smbconfoption> parameter. </para>
377
378 <para> The entry for the NT4 profile is a directory not a file. The NT help on Profiles mentions that a
379 directory is also created with a .PDS extension. The user, while logging in, must have write permission
380 to create the full profile path (and the folder with the .PDS extension for those situations where it
381 might be created.)  </para>
382
383 <para> In the profile directory, Windows NT4 creates more folders than Windows 9x/Me. It creates
384 <filename>Application Data</filename> and others, as well as <filename>Desktop</filename>,
385 <filename>Nethood</filename>, <filename>Start Menu,</filename> and <filename>Programs</filename>.
386 The profile itself is stored in a file <filename>NTuser.DAT</filename>. Nothing appears to be stored
387 in the .PDS directory, and its purpose is currently unknown. </para>
388
389 <para> You can use the <application>System Control Panel</application> to copy a local profile onto
390 a Samba server (see NT Help on Profiles; it is also capable of firing up the correct location in the
391 <application>System Control Panel</application> for you). The NT Help file also mentions that renaming
392 <filename>NTuser.DAT</filename> to <filename>NTuser.MAN</filename> turns a profile into a mandatory one.
393 </para>
394
395 <para> The case of the profile is significant.  The file must be called <filename>NTuser.DAT</filename>
396 or, for a mandatory profile, <filename>NTuser.MAN</filename>. </para> </sect3>
397
398 <sect3> <title>Windows 2000/XP Professional</title>
399
400 <para> You must first convert the profile from a local profile to a domain profile on the MS Windows
401 workstation as follows: </para>
402
403 <procedure>
404         <step><para> Log on as the <emphasis>local</emphasis> workstation administrator. </para></step>
405
406         <step><para> Right-click on the <guiicon>My Computer</guiicon> Icon, select
407         <guimenuitem>Properties</guimenuitem>.</para></step>
408
409         <step><para> Click on the <guilabel>User Profiles</guilabel> tab.</para></step>
410
411         <step><para> Select the profile you wish to convert (click it once).</para></step>
412
413         <step><para> Click on the <guibutton>Copy To</guibutton> button.</para></step>
414
415         <step><para> In the <guilabel>Permitted to use</guilabel> box, click on the
416         <guibutton>Change</guibutton> button. </para></step>
417
418         <step><para> Click on the <guilabel>Look in</guilabel> area that lists the machine name. When you click here, it will
419         open up a selection box. Click on the domain to which the profile must be accessible. </para>
420
421         <note><para>You will need to log on if a logon box opens up. 
422         For example, connect as <replaceable>DOMAIN</replaceable>\root, password:
423         <replaceable>mypassword</replaceable>.</para></note> </step>
424
425         <step><para> To make the profile capable of being used by anyone, select <quote>Everyone</quote>. </para></step>
426
427         <step><para> Click on <guibutton>OK</guibutton> and the Selection box will close. </para></step>
428
429         <step><para> Now click on <guibutton>OK</guibutton> to create the profile in the path
430         you nominated.  </para></step>
431 </procedure>
432
433 <para> Done. You now have a profile that can be edited using the Samba <command>profiles</command> tool.
434 </para>
435
436 <note><para>
437 Under Windows NT/200x, the use of mandatory profiles forces the use of MS Exchange storage of mail
438 data and keeps it out of the desktop profile. That keeps desktop profiles from becoming unusable.
439 </para> </note>
440
441 <sect4>
442 <title>Windows XP Service Pack 1</title>
443         <para>
444         There is a security check new to Windows XP (or maybe only Windows XP service pack 1).
445         It can be disabled via a group policy in the Active Directory. The policy is called:
446         </para>
447
448         <para>
449                 <filename>Computer Configuration\Administrative Templates\System\User Profiles\<?latex \linebreak ?>Do not check for
450         user ownership of Roaming Profile Folders</filename>i
451         </para>
452
453         <para>
454         This should be set to <constant>Enabled</constant>.
455         </para>
456
457         <para>
458         Does the new version of Samba have an Active Directory analogue?  If so, then you may be able to set the policy through this.
459         </para>
460
461         <para>If you cannot set group policies in Samba, then you may be able to set the policy locally on
462         each machine. If you want to try this, then do the following (N.B. I do not know for sure that this
463         will work in the same way as a domain group policy):
464         </para>
465
466
467 <procedure>
468         <step><para>On the XP workstation, log in with an Administrative account.</para></step>
469
470         <step><para>Click on <guimenu>Start</guimenu> -> <guimenuitem>Run</guimenuitem>.</para></step>
471         <step><para>Type <command>mmc</command>.</para></step>
472         <step><para>Click on <guibutton>OK</guibutton>.</para></step>
473         <step><para>A Microsoft Management Console should appear.</para></step>
474         <step><para>Click on <guimenu>File</guimenu> -> <guimenuitem>Add/Remove Snap-in</guimenuitem> -> <guimenuitem>Add</guimenuitem>.</para></step> 
475         <step><para>Double-click on <guiicon>Group Policy</guiicon>.</para></step> 
476         <step><para>Click on <guibutton>Finish</guibutton> -> <guibutton>Close</guibutton>.</para></step> 
477         <step><para>Click on <guibutton>OK</guibutton>.</para></step>
478         <step><para>In the <quote>Console Root</quote> window expand <guiicon>Local Computer Policy</guiicon> ->
479                 <guiicon>Computer Configuration</guiicon> -> <guiicon>Administrative Templates</guiicon> -> 
480                 <guiicon>System</guiicon> -> <guiicon>User Profiles</guiicon>.</para></step>
481         <step><para>Double-click on <guilabel>Do not check for user ownership of Roaming Profile Folders</guilabel>.</para></step>
482         <step><para>Select <guilabel>Enabled</guilabel>.</para></step>
483         <step><para>Click on <guibutton>OK</guibutton>.</para></step>
484         <step><para>Close the whole console. You do not need to save the settings (this refers to the
485         console settings rather than the policies you have changed).</para></step>
486         <step><para>Reboot.</para></step>
487 </procedure>
488 </sect4>
489 </sect3>
490 </sect2>
491
492 <sect2>
493         <title>Sharing Profiles between W9x/Me and NT4/200x/XP Workstations</title>
494
495 <para> Sharing of desktop profiles between Windows versions is not recommended. Desktop profiles are an
496 evolving phenomenon and profiles for later versions of MS Windows clients add features that may interfere
497 with earlier versions of MS Windows clients. Probably the more salient reason to not mix profiles is
498 that when logging off an earlier version of MS Windows, the older format of profile contents may overwrite
499 information that belongs to the newer version resulting in loss of profile information content when that
500 user logs on again with the newer version of MS Windows. </para>
501
502 <para> If you then want to share the same Start Menu/Desktop with W9x/Me, you will need to specify a common
503 location for the profiles. The &smb.conf; parameters that need to be common are 
504 <smbconfoption><name>logon path</name></smbconfoption> and 
505 <smbconfoption><name>logon home</name></smbconfoption>. </para>
506
507 <para> If you have this set up correctly, you will find separate <filename>user.DAT</filename> and
508 <filename>NTuser.DAT</filename> files in the same profile directory. </para>
509
510 </sect2>
511
512 <sect2>
513 <title>Profile Migration from Windows NT4/200x Server to Samba</title>
514
515 <para> There is nothing to stop you from specifying any path that you like for the location of users' profiles.
516 Therefore, you could specify that the profile be stored on a Samba server, or any other SMB server,
517 as long as that SMB server supports encrypted passwords. </para>
518
519 <sect3>
520 <title>Windows NT4 Profile Management Tools</title>
521
522 <para> Unfortunately, the Resource Kit information is specific to the version of MS Windows NT4/200x. The
523 correct resource kit is required for each platform. </para>
524
525 <para>Here is a quick guide:</para>
526
527 <procedure>
528         <step><para> On your NT4 Domain Controller, right click on <guiicon>My Computer</guiicon>, then select the
529         tab labeled <guilabel>User Profiles</guilabel>. </para></step>
530
531         <step><para> Select a user profile you want to migrate and click on it. </para>
532
533         <note><para>I am using the term <quote>migrate</quote> loosely. You can copy a profile to create a group
534         profile. You can give the user <parameter>Everyone</parameter> rights to the profile you copy this to. That
535         is what you need to do, since your Samba domain is not a member of a trust relationship with your NT4
536         PDC.</para></note></step>
537
538         <step><para>Click on the <guibutton>Copy To</guibutton> button.</para></step>
539
540         <step><para>In the box labeled <guilabel>Copy Profile to</guilabel> add your new path, e.g.,
541         <filename>c:\temp\foobar</filename></para></step>
542
543         <step><para>Click on <guibutton>Change</guibutton> in the <guilabel>Permitted to use</guilabel> box.</para></step>
544
545         <step><para>Click on the group <quote>Everyone</quote>, click on <guibutton>OK</guibutton>. This
546         closes the <quote>choose user</quote> box.</para></step>
547
548         <step><para>Now click on <guibutton>OK</guibutton>.</para></step>
549 </procedure>
550
551 <para> Follow the above for every profile you need to migrate.  </para>
552
553 </sect3>
554
555 <sect3>
556 <title>Side Bar Notes</title>
557
558
559 <para>
560 <indexterm><primary>SID</primary></indexterm>
561 You should obtain the SID of your NT4 domain. You can use smbpasswd to do this. Read the man
562 page.</para>
563
564 </sect3>
565
566 <sect3> <title>moveuser.exe</title>
567
568 <para> The Windows 200x professional resource kit has <command>moveuser.exe</command>. <command>moveuser.exe</command> changes the security of a profile
569 from one user to another. This allows the account domain to change, and/or the user name to change.</para>
570
571 <para>
572 This command is like the Samba <command>profiles</command> tool.
573 </para>
574
575 </sect3>
576
577 <sect3>
578 <title>Get SID</title>
579
580 <para>
581 <indexterm><primary>SID</primary></indexterm>
582 You can identify the SID by using <command>GetSID.exe</command> from the Windows NT Server 4.0 Resource Kit. </para>
583
584 <para> Windows NT 4.0 stores the local profile information in the registry under the following key:
585 <filename>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList</filename> </para>
586
587 <para> Under the ProfileList key, there will be subkeys named with the SIDs of the users who have logged
588 on to this computer. (To find the profile information for the user whose locally cached profile you want
589 to move, find the SID for the user with the <command>GetSID.exe</command> utility.) Inside the appropriate user's subkey,
590 you will see a string value named <parameter>ProfileImagePath</parameter>. </para>
591
592 </sect3> </sect2> </sect1>
593
594 <sect1> <title>Mandatory Profiles</title>
595
596 <para>
597 <indexterm><primary>mandatory profiles</primary></indexterm>
598 A Mandatory Profile is a profile that the user does not have the ability to overwrite. During the
599 user's session, it may be possible to change the desktop environment, however, as the user logs out all changes
600 made will be lost. If it is desired to not allow the user any ability to change the desktop environment,
601 then this must be done through policy settings. See the previous chapter. </para>
602
603 <note><para> Under NO circumstances should the profile directory (or its
604 contents) be made read-only as this may render the profile un-usable.
605 Where it is essential to make a profile read-only within the UNIX file
606 system, this can be done but then you absolutely must use the
607 <command>fake-permissions</command> VFS module to instruct MS Windows
608 NT/200x/XP clients that the Profile has write permission for the user.
609 See <link linkend="fakeperms">fake_perms VFS module</link>. </para></note>
610
611 <para> For MS Windows NT4/200x/XP, the above method can also be used to create mandatory profiles. To
612 convert a group profile into a mandatory profile, simply locate the <filename>NTUser.DAT</filename> file in the copied profile
613 and rename it to <filename>NTUser.MAN</filename>. </para>
614
615 <para> For MS Windows 9x/ME, it is the <filename>User.DAT</filename> file that must be renamed to
616 <filename>User.MAN</filename> to effect a mandatory profile. </para>
617
618 </sect1>
619
620 <sect1>
621 <title>Creating and Managing Group Profiles</title>
622
623 <para>
624 <indexterm><primary>group profiles</primary></indexterm>
625 Most organizations are arranged into departments. There is a nice benefit in this fact since usually
626 most users in a department require the same desktop applications and the same desktop layout. MS
627 Windows NT4/200x/XP will allow the use of Group Profiles. A Group Profile is a profile that is created
628 first using a template (example) user. Then using the profile migration tool (see above), the profile is
629 assigned access rights for the user group that needs to be given access to the group profile. </para>
630
631 <para> The next step is rather important. Instead of assigning a group profile to users (Using User Manager)
632 on a <quote>per user</quote> basis, the group itself is assigned the now modified profile. </para>
633
634 <note>
635 <para> Be careful with Group Profiles. If the user who is a member of a group also has a personal
636 profile, then the result will be a fusion (merge) of the two. </para>
637 </note>
638
639 </sect1>
640
641 <sect1>
642 <title>Default Profile for Windows Users</title>
643
644 <para>
645 <indexterm><primary>default profile</primary></indexterm>
646 MS Windows 9x/Me and NT4/200x/XP will use a default profile for any user for whom a profile
647 does not already exist. Armed with a knowledge of where the default profile is located on the Windows
648 workstation, and knowing which registry keys effect the path from which the default profile is created,
649 it is possible to modify the default profile to one that has been optimized for the site. This has
650 significant administrative advantages.  </para>
651
652 <sect2>
653 <title>MS Windows 9x/Me</title>
654
655 <para> To enable default per use profiles in Windows 9x/ME, you can either use the <application>Windows
656 98 System Policy Editor</application> or change the registry directly.  </para>
657
658 <para> To enable default per user profiles in Windows 9x/ME, launch the <application>System Policy
659 Editor</application>, then select <guimenu>File</guimenu> -> <guimenuitem>Open Registry</guimenuitem>,
660 next click on the <guiicon>Local Computer</guiicon> icon, click on <guilabel>Windows 98 System</guilabel>,
661 select <guilabel>User Profiles</guilabel>, and click on the enable box. Remember to save the registry
662 changes. </para>
663
664 <para> To modify the registry directly, launch the <application>Registry Editor</application>
665 (<command>regedit.exe</command>) and select the hive <filename>HKEY_LOCAL_MACHINE\Network\Logon</filename>. Now
666 add a DWORD type key with the name <quote>User Profiles,</quote> to
667 enable user profiles to set the value
668 to 1; to disable user profiles set it to 0. </para>
669
670 <sect3>
671 <title>User Profile Handling with Windows 9x/Me</title>
672
673 <para> When a user logs on to a Windows 9x/Me machine, the local profile path,
674 <filename>HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ProfileList</filename>, is checked
675 for an existing entry for that user. </para>
676
677 <para> If the user has an entry in this registry location, Windows 9x/Me checks for a locally cached
678 version of the user profile. Windows 9x/Me also checks the user's home directory (or other specified
679 directory if the location has been modified) on the server for the User Profile. If a profile exists
680 in both locations, the newer of the two is used. If the User Profile exists on the server, but does not
681 exist on the local machine, the profile on the server is downloaded and used. If the User Profile only
682 exists on the local machine, that copy is used. </para>
683
684 <para> If a User Profile is not found in either location, the Default User Profile from the Windows
685 9x/Me machine is used and copied to a newly created folder for the logged on user. At log off, any
686 changes that the user made are written to the user's local profile. If the user has a roaming profile,
687 the changes are written to the user's profile on the server. </para>
688
689 </sect3> </sect2>
690
691 <sect2>
692 <title>MS Windows NT4 Workstation</title>
693
694 <para> On MS Windows NT4, the default user profile is obtained from the location
695 <filename>%SystemRoot%\Profiles</filename> which in a default installation will translate to
696 <filename>C:\Windows NT\Profiles</filename>. Under this directory on a clean install there will be three
697 (3) directories: <filename>Administrator</filename>, <filename>All
698 Users,</filename> and <filename>Default
699 User</filename>. </para>
700
701 <para> The <filename>All Users</filename> directory contains menu settings that are common across all
702 system users. The <filename>Default User</filename> directory contains menu entries that are customizable
703 per user depending on the profile settings chosen/created. </para>
704
705 <para> When a new user first logs onto an MS Windows NT4 machine, a new profile is created from: </para>
706
707 <itemizedlist>
708         <listitem><para>All Users settings.</para></listitem>
709         <listitem><para>Default User settings (contains the default <filename>NTUser.DAT</filename> file).</para></listitem>
710 </itemizedlist>
711
712 <para> When a user logs onto an MS Windows NT4 machine that is a member of a Microsoft security domain,
713         the following steps are followed in respect of profile handling: 
714
715 <indexterm><primary>NTConfig.POL</primary></indexterm>
716 </para>
717
718
719 <procedure>
720         <step> <para> The users' account information that is obtained during the logon process
721         contains the location of the users' desktop profile. The profile path may be local to
722         the machine or it may be located on a network share. If there exists a profile at the
723         location of the path from the user account, then this profile is copied to the location
724         <filename>%SystemRoot%\Profiles\%USERNAME%</filename>. This profile then inherits the settings
725         in the <filename>All Users</filename> profile in the <filename>%SystemRoot%\Profiles</filename>
726         location. </para> </step>
727
728         <step> <para> If the user account has a profile path, but at its location a profile does not
729         exist, then a new profile is created in the <filename>%SystemRoot%\Profiles\%USERNAME%</filename>
730         directory from reading the <filename>Default User</filename> profile. </para> </step>
731
732         <step> <para> If the NETLOGON share on the authenticating server (logon server) contains
733         a policy file (<filename>NTConfig.POL</filename>), then its contents are applied to the
734         <filename>NTUser.DAT</filename> which is applied to the <filename>HKEY_CURRENT_USER</filename>
735         part of the registry. 
736         </para> </step>
737
738         <step> <para> When the user logs out, if the profile is set to be a roaming profile it will be
739         written out to the location of the profile. The <filename>NTuser.DAT</filename> file is then
740         recreated from the contents of the <filename>HKEY_CURRENT_USER</filename> contents. Thus,
741         should there not exist in the NETLOGON share an <filename>NTConfig.POL</filename> at the next
742         logon, the effect of the previous <filename>NTConfig.POL</filename> will still be held in the
743         profile. The effect of this is known as tattooing.
744         </para> </step>
745 </procedure>
746
747 <para> MS Windows NT4 profiles may be <emphasis>local</emphasis> or <emphasis>roaming</emphasis>. A local
748 profile will stored in the <filename>%SystemRoot%\Profiles\%USERNAME%</filename> location. A roaming
749 profile will also remain stored in the same way, unless the following registry key is created as shown: </para>
750
751 <para><screen> HKEY_LOCAL_MACHINE\SYSTEM\Software\Microsoft\Windows NT\CurrentVersion\
752 winlogon\"DeleteRoamingCache"=dword:0000000
753  </screen>
754 In this case, the local copy (in <filename>%SystemRoot%\Profiles\%USERNAME%</filename>) will be deleted
755 on logout.</para>
756
757 <para> Under MS Windows NT4, default locations for common resources like <filename>My Documents</filename>
758 may be redirected to a network share by modifying the following registry keys. These changes may be
759 affected via use of the System Policy Editor. To do so may require that you create your own template
760 extension for the policy editor to allow this to be done through the GUI. Another way to do this is by
761 way of first creating a default user profile, then while logged in as that user, run <command>regedt32</command> to edit
762 the key settings. </para>
763
764 <para>
765 The Registry Hive key that affects the behavior of folders that are part of the default user
766 profile are controlled by entries on Windows NT4 is:
767 <screen>
768 HKEY_CURRENT_USER
769         \Software
770                 \Microsoft
771                         \Windows
772                                 \CurrentVersion
773                                         \Explorer
774                                                 \User Shell Folders
775 </screen>
776 <indexterm><primary>windows registry settings</primary><secondary>default profile locations</secondary></indexterm>
777 </para>
778
779 <para>  The above hive key contains a list of automatically managed
780 folders. The default entries are shown in <link linkend="ProfileLocs">the next table</link>.
781 </para>
782
783 <table frame="all" id="ProfileLocs">
784         <title>User Shell Folder Registry Keys Default Values</title>
785         <tgroup cols="2">
786                 <colspec align="left"/>
787                 <colspec align="left"/>
788         <thead>
789                 <row><entry>Name</entry><entry>Default Value</entry></row>
790         </thead>
791         <tbody>
792                 <row><entry>AppData</entry><entry>%USERPROFILE%\Application Data</entry></row>
793                 <row><entry>Desktop</entry><entry>%USERPROFILE%\Desktop</entry></row>
794                 <row><entry>Favorites</entry><entry>%USERPROFILE%\Favorites</entry></row>
795                 <row><entry>NetHood</entry><entry>%USERPROFILE%\NetHood</entry></row>
796                 <row><entry>PrintHood</entry><entry>%USERPROFILE%\PrintHood</entry></row>
797                 <row><entry>Programs</entry><entry>%USERPROFILE%\Start Menu\Programs</entry></row>
798                 <row><entry>Recent</entry><entry>%USERPROFILE%\Recent</entry></row>
799                 <row><entry>SendTo</entry><entry>%USERPROFILE%\SendTo</entry></row>
800                 <row><entry>Start Menu </entry><entry>%USERPROFILE%\Start Menu</entry></row>
801                 <row><entry>Startup</entry><entry>%USERPROFILE%\Start Menu\Programs\Startup</entry></row>
802         </tbody>
803         </tgroup>
804 </table>
805
806 <para> The registry key that contains the location of the default profile settings is: </para>
807
808 <para> <filename>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\<?latex \linebreak ?>
809 User Shell Folders</filename> </para>
810
811 <para> The default entries are shown in <link linkend="regkeys">the next table</link>.</para>
812
813 <table frame="all" id="regkeys">
814         <title>Defaults of Profile Settings Registry Keys</title>
815         <tgroup cols="2">
816                 <colspec align="left"/>
817                 <colspec align="left"/>
818         <tbody>
819                 <row><entry>Common Desktop</entry><entry>%SystemRoot%\Profiles\All Users\Desktop</entry></row>
820                 <row><entry>Common Programs</entry><entry>%SystemRoot%\Profiles\All Users\Programs</entry></row>
821                 <row><entry>Common Start Menu</entry><entry>%SystemRoot%\Profiles\All Users\Start Menu</entry></row>
822                 <row><entry>Common Startup</entry><entry>%SystemRoot%\Profiles\All Users\Start Menu\Programs\Startup</entry></row>
823         </tbody>
824         </tgroup>
825 </table>
826
827 </sect2>
828
829 <sect2> <title>MS Windows 200x/XP</title>
830
831 <note><para>
832 <indexterm><primary>GPOs</primary></indexterm>
833 MS Windows XP Home Edition does use default per user profiles, but cannot participate
834 in domain security, cannot log onto an NT/ADS-style domain, and thus can obtain the profile only
835 from itself. While there are benefits in doing this, the beauty of those MS Windows clients that
836 can participate in domain logon processes allows the administrator to create a global default
837 profile and enforce it through the use of Group Policy Objects (GPOs).
838 </para></note>
839
840 <para> When a new user first logs onto an MS Windows 200x/XP machine, the default profile is obtained from
841 <filename>C:\Documents and Settings\Default User</filename>. The administrator can modify or change the
842 contents of this location and MS Windows 200x/XP will gladly use it. This is far from the optimum arrangement
843 since it will involve copying a new default profile to every MS Windows 200x/XP client workstation. </para>
844
845 <para> When MS Windows 200x/XP participates in a domain security context, and if the default user profile is
846         not found, then the client will search for a default profile in the NETLOGON share of the authenticating
847         server. In MS Windows parlance,<?latex \linebreak ?><filename>%LOGONSERVER%\NETLOGON\Default User,</filename> and if one
848 exists there it will copy this to the workstation to the <filename>C:\Documents and Settings\</filename>
849 under the Windows login name of the user. </para>
850
851 <note> <para> This path translates, in Samba parlance, to the &smb.conf;
852 <smbconfsection>[NETLOGON]</smbconfsection> share. The directory should be created at the root
853 of this share and must be called <filename>Default User</filename>.
854 </para> </note>
855
856 <para> If a default profile does not exist in this location, then MS Windows 200x/XP will use the local
857 default profile. </para>
858
859 <para> On logging out, the users' desktop profile will be stored to the location specified in the registry
860 settings that pertain to the user. If no specific policies have been created or passed to the client
861 during the login process (as Samba does automatically), then the user's profile will be written to the
862 local machine only under the path <filename>C:\Documents and Settings\%USERNAME%</filename>. </para>
863
864 <para> Those wishing to modify the default behavior can do so through these three methods: </para>
865
866 <itemizedlist>
867         <listitem> <para> Modify the registry keys on the local machine manually and place the new
868         default profile in the NETLOGON share root. This is not recommended as it is maintenance intensive.
869         </para> </listitem>
870
871         <listitem> <para> Create an NT4-style NTConfig.POL file that specified this behavior and locate
872         this file in the root of the NETLOGON share along with the new default profile. </para> </listitem>
873
874         <listitem> <para> Create a GPO that enforces this through Active Directory, and place the new
875         default profile in the NETLOGON share.  </para> </listitem>
876 </itemizedlist>
877
878 <para>The registry hive key that effects the behavior of folders that are part of the default user
879 profile are controlled by entries on Windows 200x/XP is: </para>
880
881 <para> <filename>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell
882 Folders\</filename> </para>
883
884 <para>
885 The above hive key contains a list of automatically managed folders. The default entries are shown
886 in <link linkend="defregpthkeys">the next table</link>
887 <indexterm><primary>windows registry settings</primary><secondary>default profile locations</secondary></indexterm>
888 </para>
889
890
891 <table frame="all" id="defregpthkeys">
892         <title>Defaults of Default User Profile Paths Registry Keys</title>
893         <tgroup cols="2">
894                 <colspec align="left"/>
895                 <colspec align="left"/>
896         <thead>
897                 <row><entry>Name</entry><entry>Default Value</entry></row>
898         </thead>
899         <tbody>
900                 <row><entry>AppData</entry><entry>%USERPROFILE%\Application Data</entry></row>
901                 <row><entry>Cache</entry><entry>%USERPROFILE%\Local Settings\Temporary Internet Files</entry></row>
902                 <row><entry>Cookies</entry><entry>%USERPROFILE%\Cookies</entry></row>
903                 <row><entry>Desktop</entry><entry>%USERPROFILE%\Desktop</entry></row>
904                 <row><entry>Favorites</entry><entry>%USERPROFILE%\Favorites</entry></row>
905                 <row><entry>History</entry><entry>%USERPROFILE%\Local Settings\History</entry></row>
906                 <row><entry>Local AppData</entry><entry>%USERPROFILE%\Local Settings\Application Data</entry></row>
907                 <row><entry>Local Settings</entry><entry>%USERPROFILE%\Local Settings</entry></row>
908                 <row><entry>My Pictures</entry><entry>%USERPROFILE%\My Documents\My Pictures</entry></row>
909                 <row><entry>NetHood</entry><entry>%USERPROFILE%\NetHood</entry></row>
910                 <row><entry>Personal</entry><entry>%USERPROFILE%\My Documents</entry></row>
911                 <row><entry>PrintHood</entry><entry>%USERPROFILE%\PrintHood</entry></row>
912                 <row><entry>Programs</entry><entry>%USERPROFILE%\Start Menu\Programs</entry></row>
913                 <row><entry>Recent</entry><entry>%USERPROFILE%\Recent</entry></row>
914                 <row><entry>SendTo</entry><entry>%USERPROFILE%\SendTo</entry></row>
915                 <row><entry>Start Menu</entry><entry>%USERPROFILE%\Start Menu</entry></row>
916                 <row><entry>Startup</entry><entry>%USERPROFILE%\Start Menu\Programs\Startup</entry></row>
917                 <row><entry>Templates</entry><entry>%USERPROFILE%\Templates</entry></row>
918         </tbody>
919         </tgroup>
920 </table>
921
922 <para> There is also an entry called <quote>Default</quote> that has no value set. The default entry is
923 of type <constant>REG_SZ</constant>, all the others are of type <constant>REG_EXPAND_SZ</constant>. </para>
924
925 <para> It makes a huge difference to the speed of handling roaming user profiles if all the folders are
926 stored on a dedicated location on a network server. This means that it will not be necessary to write
927 the Outlook PST file over the network for every login and logout. </para>
928
929 <para> To set this to a network location, you could use the following examples: </para>
930
931 <para><filename>%LOGONSERVER%\%USERNAME%\Default Folders</filename></para>
932
933 <para> This would store the folders in the user's home directory under a directory called <filename>Default
934 Folders</filename>. You could also use: </para>
935
936 <para><filename>\\<replaceable>SambaServer</replaceable>\<replaceable>FolderShare</replaceable>\%USERNAME%</filename></para>
937
938 <para>
939 in which case the default folders will be stored in the server named <replaceable>SambaServer</replaceable>
940 in the share called <replaceable>FolderShare</replaceable> under a directory that has the name of the
941 MS Windows user as seen by the Linux/UNIX file system.  </para>
942
943 <para> Please note that once you have created a default profile share, you MUST migrate a user's profile
944 (default or custom) to it. </para>
945
946 <para> MS Windows 200x/XP profiles may be <emphasis>Local</emphasis> or <emphasis>Roaming</emphasis>.
947         A roaming profile will be cached locally unless the following registry key is created: 
948
949 <indexterm><primary>delete roaming profiles</primary></indexterm>
950 </para>
951
952
953 <para> <programlisting> HKEY_LOCAL_MACHINE\SYSTEM\Software\Microsoft\Windows NT\CurrentVersion\
954         winlogon\"DeleteRoamingCache"=dword:00000001</programlisting></para>
955
956 <para>
957 In this case, the local cache copy will be deleted on logout.
958 </para> 
959 </sect2> 
960 </sect1>
961
962 <sect1> <title>Common Errors</title>
963
964 <para>
965 The following are some typical errors, problems and questions that have been asked on the Samba mailing lists.
966 </para>
967
968 <sect2>
969 <title>Configuring Roaming Profiles for a Few Users or Groups</title>
970
971 <para>
972 With Samba-2.2.x, the choice you have is to enable or disable roaming profiles support. It is a
973 global only setting. The default is to have roaming profiles and the default path will locate them in
974 the user's home directory.
975 </para>
976
977 <para>
978 If disabled globally, then no one will have roaming profile ability. If enabled and you want it
979 to apply only to certain machines, then on those machines on which roaming profile support is not wanted
980 it is then necessary to disable roaming profile handling in the registry of each such machine.
981 </para>
982
983 <para>
984 With Samba-3, you can have a global profile setting in &smb.conf; and you can override this by
985 per-user settings using the Domain User Manager (as with MS Windows NT4/ Win 200xx). </para>
986
987 <para> In any case, you can configure only one profile per user. That profile can be either: </para>
988
989 <itemizedlist>
990         <listitem>A profile unique to that user.</listitem>
991         <listitem>A mandatory profile (one the user cannot change).</listitem>
992         <listitem>A group profile (really should be mandatory, that is unchangable).</listitem>
993 </itemizedlist>
994
995 </sect2>
996
997 <sect2> <title>Cannot Use Roaming Profiles</title>
998
999 <para> A user requested the following: <quote> I do not want Roaming profiles to be implemented. I want
1000 to give users a local profile alone. Please help me, I am totally lost with this error. For the past
1001 two days I tried everything, I googled around but found no useful pointers. Please help me. </quote></para>
1002
1003 <para> The choices are: </para>
1004
1005 <variablelist>
1006         <varlistentry>
1007                 <term>Local profiles</term> <listitem><para> I know of no registry keys that will allow
1008                 auto-deletion of LOCAL profiles on log out.</para></listitem>
1009         </varlistentry>
1010
1011         <varlistentry>
1012                 <term>Roaming profiles</term> <listitem><para> As a user logs onto the network, a centrally
1013                 stored profile is copied to the workstation to form a local profile. This local profile
1014                 will persist (remain on the workstation disk) unless a registry key is changed that will
1015                 cause this profile to be automatically deleted on logout. </para></listitem>
1016         </varlistentry>
1017 </variablelist>
1018
1019 <para>The roaming profile choices are: </para>
1020
1021 <variablelist>
1022         <varlistentry>
1023                 <term>Personal roaming profiles</term> <listitem><para> These are typically stored in
1024                 a profile share on a central (or conveniently located local) server. </para>
1025
1026                 <para> Workstations cache (store) a local copy of the profile. This cached
1027                 copy is used when the profile cannot be downloaded at next logon. </para></listitem>
1028         </varlistentry>
1029
1030         <varlistentry>
1031                 <term>Group profiles</term> <listitem><para>These are loaded from a central profile
1032                 server.</para></listitem>
1033         </varlistentry>
1034
1035         <varlistentry>
1036                 <term>Mandatory profiles</term> <listitem><para> Mandatory profiles can be created for
1037                 a user as well as for any group that a user is a member of. Mandatory profiles cannot be
1038                 changed by ordinary users. Only the administrator can change or reconfigure a mandatory
1039                 profile. </para></listitem>
1040         </varlistentry>
1041 </variablelist>
1042
1043 <para> A Windows NT4/200x/XP profile can vary in size from 130KB to very large. Outlook PST files are
1044 most often part of the profile and can be many GB in size. On average (in a well controlled environment),
1045 roaming profile size of 2MB is a good rule of thumb to use for planning purposes. In an undisciplined
1046 environment, I have seen up to 2GB profiles. Users tend to complain when it takes an hour to log onto a
1047 workstation but they harvest the fruits of folly (and ignorance). </para>
1048
1049 <para> The point of all the above is to show that roaming profiles and good controls of how they can be
1050 changed as well as good discipline make up for a problem-free site. </para>
1051
1052 <para> Microsoft's answer to the PST problem is to store all email in an MS Exchange Server backend. This
1053 removes the need for a PST file. </para>
1054
1055 <para>Local profiles mean: </para>
1056
1057 <itemizedlist>
1058         <listitem><para>If each machine is used by many users, then much local disk storage is needed
1059         for local profiles.</para></listitem> <listitem><para>Every workstation the user logs into has
1060         its own profile; these can be very different from machine to machine.</para></listitem>
1061 </itemizedlist>
1062
1063 <para> On the other hand, use of roaming profiles means: </para>
1064
1065 <itemizedlist>
1066         <listitem><para>The network administrator can control the desktop environment of all users.</para></listitem>
1067         <listitem><para>Use of mandatory profiles drastically reduces network management overheads.</para></listitem>
1068         <listitem><para>In the long run, users will experience fewer problems.</para></listitem>
1069 </itemizedlist>
1070
1071 </sect2>
1072
1073 <sect2>
1074 <title>Changing the Default Profile</title>
1075
1076 <para><quote>When the client logs onto the Domain Controller, it searches
1077 for a profile to download. Where do I put this default profile?</quote></para>
1078
1079 <para>
1080 <indexterm><primary>default profile</primary></indexterm>
1081 First, the Samba server needs to be configured as a Domain Controller. This can be done by
1082 setting in &smb.conf;: </para>
1083
1084 <smbconfblock>
1085 <smbconfoption><name>security</name><value>user</value></smbconfoption>
1086 <smbconfoption><name>os level</name><value>32 (or more)</value></smbconfoption>
1087 <smbconfoption><name>domain logons</name><value>Yes</value></smbconfoption>
1088 </smbconfblock>
1089
1090 <para> There must be a <smbconfsection>[netlogon]</smbconfsection> share that is world readable. It is
1091 a good idea to add a logon script to pre-set printer and drive connections. There is also a facility
1092 for automatically synchronizing the workstation time clock with that of the logon server (another good
1093 thing to do). </para>
1094
1095 <note><para> To invoke auto-deletion of roaming profile from the local workstation cache (disk storage), use
1096 the <application>Group Policy Editor</application> to create a file called <filename>NTConfig.POL</filename>
1097 with the appropriate entries. This file needs to be located in the <smbconfsection>netlogon</smbconfsection>
1098 share root directory.</para></note>
1099
1100 <para> Windows clients need to be members of the domain. Workgroup machines do not use network logons
1101 so they do not interoperate with domain profiles. </para>
1102
1103 <para> For roaming profiles, add to &smb.conf;: </para>
1104
1105 <smbconfblock>
1106 <smbconfoption><name>logon path</name><value>\\%N\profiles\%U</value></smbconfoption>
1107 <smbconfcomment>Default logon drive is Z:</smbconfcomment>
1108 <smbconfoption><name>logon drive</name><value>H:</value></smbconfoption>
1109 <smbconfcomment>This requires a PROFILES share that is world writable.</smbconfcomment>
1110 </smbconfblock>
1111
1112 </sect2>
1113 </sect1>
1114 </chapter>