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