summaryrefslogtreecommitdiff
path: root/docs/docbook/projdoc/ProfileMgmt.sgml
blob: 9d11c80ffba02c421128e79fb4fe4169354c30d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
<chapter id="ProfileMgmt">
<chapterinfo>
	&author.jht;
    <pubdate>April 3 2003</pubdate>
</chapterinfo>

<title>Desktop Profile Management</title>

<sect1>
<title>Roaming Profiles</title>

<warning>
<para>
<emphasis>NOTE!</emphasis> Roaming profiles support is different for Win9x / Me
and Windows NT4/200x.
</para>
</warning>

<para>
Before discussing how to configure roaming profiles, it is useful to see how
Windows 9x / Me and Windows NT4/200x clients implement these features.
</para>

<para>
Windows 9x / Me clients send a NetUserGetInfo request to the server to get the user's
profiles location. However, the response does not have room for a separate
profiles location field, only the user's home share. This means that Win9X/Me
profiles are restricted to being stored in the user's home directory.
</para>


<para>
Windows NT4/200x  clients send a NetSAMLogon RPC request, which contains many fields,
including a separate field for the location of the user's profiles.
</para>

<sect2>
<title>Samba Configuration for Profile Handling</title>

<para>
This section documents how to configure Samba for MS Windows client profile support.
</para>

<sect3>
<title>NT4/200x User Profiles</title>

<para>
To support Windowns NT4/200x clients, in the [global] section of smb.conf set the
following (for example):
</para>

<para>
<programlisting>
	logon path = \\profileserver\profileshare\profilepath\%U\moreprofilepath

	This is typically implemented like:

		logon path = \\%L\Profiles\%u

	where:
		%L translates to the name of the Samba server
		%u translates to the user name
</programlisting>
</para>

<para>
The default for this option is \\%N\%U\profile, namely \\sambaserver\username\profile. 
The \\N%\%U service is created automatically by the [homes] service.  If you are using
a samba server for the profiles, you _must_ make the share specified in the logon path
browseable. Please refer to the man page for smb.conf in respect of the different
symantics of %L and %N, as well as %U and %u.
</para>

<note>
<para>
MS Windows NT/2K clients at times do not disconnect a connection to a server
between logons. It is recommended to NOT use the <emphasis>homes</emphasis>
meta-service name as part of the profile share path.
</para>
</note>
</sect3>

<sect3>
<title>Windows 9x / Me User Profiles</title>

<para>
To support Windows 9x / Me clients, you must use the "logon home" parameter. Samba has
now been fixed so that "net use /home" now works as well, and it, too, relies
on the "logon home" parameter.
</para>

<para>
By using the logon home parameter, you are restricted to putting Win9x / Me
profiles in the user's home directory.   But wait! There is a trick you
can use. If you set the following in the [global] section of your smb.conf file:
</para>
<para><programlisting>
	logon home = \\%L\%U\.profiles
</programlisting></para>

<para>
then your Windows 9x / Me clients will dutifully put their clients in a subdirectory
of your home directory called .profiles (thus making them hidden).
</para>

<para>
Not only that, but 'net use/home' will also work, because of a feature in
Windows 9x / Me. It removes any directory stuff off the end of the home directory area
and only uses the server and share portion. That is, it looks like you
specified \\%L\%U for "logon home".
</para>
</sect3>

<sect3>
<title>Mixed Windows 9x / Me and Windows NT4/200x User Profiles</title>

<para>
You can support profiles for both Win9X and WinNT clients by setting both the
"logon home" and "logon path" parameters. For example:
</para>

<para><programlisting>
	logon home = \\%L\%u\.profiles
	logon path = \\%L\profiles\%u
</programlisting></para>

</sect3>
</sect2>

<sect2>
<title>Windows Client Profile Configuration Information</title>

<sect3>
<title>Windows 9x / Me Profile Setup</title>

<para>
When a user first logs in on Windows 9X, the file user.DAT is created,
as are folders "Start Menu", "Desktop", "Programs" and "Nethood".
These directories and their contents will be merged with the local
versions stored in c:\windows\profiles\username on subsequent logins,
taking the most recent from each.  You will need to use the [global]
options "preserve case = yes", "short preserve case = yes" and
"case sensitive = no" in order to maintain capital letters in shortcuts
in any of the profile folders.
</para>

<para>
The user.DAT file contains all the user's preferences.  If you wish to
enforce a set of preferences, rename their user.DAT file to user.MAN,
and deny them write access to this file.
</para>

<orderedlist>
<listitem>
        <para>
        On the Windows 9x / Me machine, go to Control Panel -> Passwords and
        select the User Profiles tab.  Select the required level of
        roaming preferences.  Press OK, but do _not_ allow the computer
        to reboot.
        </para>
</listitem>

<listitem>
        <para>
        On the Windows 9x / Me machine, go to Control Panel -> Network ->
        Client for Microsoft Networks -> Preferences.  Select 'Log on to
        NT Domain'.  Then, ensure that the Primary Logon is 'Client for
        Microsoft Networks'.  Press OK, and this time allow the computer
        to reboot.
        </para>
</listitem>

</orderedlist>

<para>
Under Windows 9x / Me Profiles are downloaded from the Primary Logon.
If you have the Primary Logon as 'Client for Novell Networks', then
the profiles and logon script will be downloaded from your Novell
Server.  If you have the Primary Logon as 'Windows Logon', then the
profiles will be loaded from the local machine - a bit against the
concept of roaming profiles, it would seem!
</para>

<para>
You will now find that the Microsoft Networks Login box contains
[user, password, domain] instead of just [user, password].  Type in
the samba server's domain name (or any other domain known to exist,
but bear in mind that the user will be authenticated against this
domain and profiles downloaded from it, if that domain logon server
supports it), user name and user's password.
</para>

<para>
Once the user has been successfully validated, the Windows 9x / Me machine
will inform you that 'The user has not logged on before' and asks you
if you wish to save the user's preferences?  Select 'yes'.
</para>

<para>
Once the Windows 9x / Me client comes up with the desktop, you should be able
to examine the contents of the directory specified in the "logon path"
on the samba server and verify that the "Desktop", "Start Menu",
"Programs" and "Nethood" folders have been created.
</para>

<para>
These folders will be cached locally on the client, and updated when
the user logs off (if you haven't made them read-only by then).
You will find that if the user creates further folders or short-cuts,
that the client will merge the profile contents downloaded with the
contents of the profile directory already on the local client, taking
the newest folders and short-cuts from each set.
</para>

<para>
If you have made the folders / files read-only on the samba server,
then you will get errors from the Windows 9x / Me machine on logon and logout, as
it attempts to merge the local and the remote profile.  Basically, if
you have any errors reported by the Windows 9x / Me machine, check the Unix file
permissions and ownership rights on the profile directory contents,
on the samba server.
</para>

<para>
If you have problems creating user profiles, you can reset the user's
local desktop cache, as shown below.  When this user then next logs in,
they will be told that they are logging in "for the first time".
</para>

<orderedlist>
<listitem>
        <para>
        instead of logging in under the [user, password, domain] dialog,
        press escape.
        </para>
</listitem>
<listitem>
        <para>
        run the regedit.exe program, and look in:
        </para>

        <para>
        HKEY_LOCAL_MACHINE\Windows\CurrentVersion\ProfileList
        </para>

        <para>
        you will find an entry, for each user, of ProfilePath.  Note the
        contents of this key (likely to be c:\windows\profiles\username),
        then delete the key ProfilePath for the required user.

        [Exit the registry editor].

        </para>
</listitem>

	<listitem>
        <para>
        <emphasis>WARNING</emphasis> - before deleting the contents of the
        directory listed in the ProfilePath (this is likely to be
	<filename>c:\windows\profiles\username)</filename>, ask them if they
	have any important files stored on their desktop or in their start menu. 
	Delete the contents of the directory ProfilePath (making a backup if any
	of the files are needed).
        </para>

        <para>
	This will have the effect of removing the local (read-only hidden
	system file) user.DAT in their profile directory, as well as the
	local "desktop", "nethood", "start menu" and "programs" folders.
        </para>
	</listitem>

	<listitem>
        <para>
        search for the user's .PWL password-caching file in the c:\windows
        directory, and delete it.
        </para>
	</listitem>

	<listitem>
        <para>
        log off the windows 9x / Me client.
        </para>
	</listitem>

	<listitem>
        <para>
        check the contents of the profile path (see "logon path" described
        above), and delete the user.DAT or user.MAN file for the user,
        making a backup if required.
        </para>
	</listitem>

</orderedlist>

<para>
If all else fails, increase samba's debug log levels to between 3 and 10,
and / or run a packet trace program such as ethereal or netmon.exe, and
look for error messages.
</para>

<para>
If you have access to an Windows NT4/200x server, then first set up roaming profiles
and / or netlogons on the Windows NT4/200x server.  Make a packet trace, or examine
the example packet traces provided with Windows NT4/200x server, and see what the
differences are with the equivalent samba trace.
</para>

</sect3>

<sect3>
<title>Windows NT4 Workstation</title>

<para>
When a user first logs in to a Windows NT Workstation, the profile
NTuser.DAT is created.  The profile location can be now specified
through the "logon path" parameter.
</para>

<para>
There is a parameter that is now available for use with NT Profiles:
"logon drive".  This should be set to <filename>H:</filename> or any other drive, and
should be used in conjunction with the new "logon home" parameter.
</para>

<para>
The entry for the NT4 profile is a _directory_ not a file.  The NT
help on profiles mentions that a directory is also created with a .PDS
extension.  The user, while logging in, must have write permission to
create the full profile path (and the folder with the .PDS extension
for those situations where it might be created.)
</para>

<para>
In the profile directory, Windows NT4 creates more folders than Windows 9x / Me. 
It creates "Application Data" and others, as well as "Desktop", "Nethood",
"Start Menu" and "Programs".  The profile itself is stored in a file
NTuser.DAT.  Nothing appears to be stored in the .PDS directory, and
its purpose is currently unknown.
</para>

<para>
You can use the System Control Panel to copy a local profile onto
a samba server (see NT Help on profiles: it is also capable of firing
up the correct location in the System Control Panel for you).  The
NT Help file also mentions that renaming NTuser.DAT to NTuser.MAN
turns a profile into a mandatory one.
</para>

<para>
The case of the profile is significant.  The file must be called
NTuser.DAT or, for a mandatory profile, NTuser.MAN.
</para>
</sect3>

<sect3>
<title>Windows 2000/XP Professional</title>

<para>
You must first convert the profile from a local profile to a domain
profile on the MS Windows workstation as follows:
</para>

<itemizedlist>
<listitem><para>
Log on as the LOCAL workstation administrator.
</para></listitem>

<listitem><para>
Right click on the 'My Computer' Icon, select 'Properties'
</para></listitem>

<listitem><para>
Click on the 'User Profiles' tab
</para></listitem>

<listitem><para>
Select the profile you wish to convert (click on it once)
</para></listitem>

<listitem><para>
Click on the button 'Copy To'
</para></listitem>

<listitem><para>
In the "Permitted to use" box, click on the 'Change' button.
</para></listitem>

<listitem><para>
Click on the 'Look in" area that lists the machine name, when you click
here it will open up a selection box. Click on the domain to which the
profile must be accessible.
</para>

<note><para>You will need to log on if a logon box opens up. Eg: In the connect
as: MIDEARTH\root, password: mypassword.</para></note>
</listitem>

<listitem><para>
To make the profile capable of being used by anyone select 'Everyone'
</para></listitem>

<listitem><para>
Click OK. The Selection box will close.
</para></listitem>

<listitem><para>
Now click on the 'Ok' button to create the profile in the path you
nominated.
</para></listitem>
</itemizedlist>

<para>
Done. You now have a profile that can be editted using the samba-3.0.0
profiles tool.
</para>

<note>
<para>
Under NT/2K the use of mandotory profiles forces the use of MS Exchange
storage of mail data. That keeps desktop profiles usable.
</para>
</note>

<note>
<itemizedlist>
<listitem><para>
This is a security check new to Windows XP (or maybe only
Windows XP service pack 1).  It can be disabled via a group policy in
Active Directory.  The policy is:</para>

<para>"Computer Configuration\Administrative Templates\System\User
Profiles\Do not check for user ownership of Roaming Profile Folders"</para>

<para>...and it should be set to "Enabled".
Does the new version of samba have an Active Directory analogue?  If so,
then you may be able to set the policy through this.
</para>

<para>
If you cannot set group policies in samba, then you may be able to set
the policy locally on each machine.  If you want to try this, then do
the following (N.B. I don't know for sure that this will work in the
same way as a domain group policy):
</para>

</listitem>

<listitem><para>
On the XP workstation log in with an Administrator account.
</para></listitem>

<listitem><para>Click: "Start", "Run"</para></listitem>
<listitem><para>Type: "mmc"</para></listitem>
<listitem><para>Click: "OK"</para></listitem>

<listitem><para>A Microsoft Management Console should appear.</para></listitem>
<listitem><para>Click: File, "Add/Remove Snap-in...", "Add"</para></listitem>
<listitem><para>Double-Click: "Group Policy"</para></listitem>
<listitem><para>Click: "Finish", "Close"</para></listitem>
<listitem><para>Click: "OK"</para></listitem>

<listitem><para>In the "Console Root" window:</para></listitem>
<listitem><para>Expand: "Local Computer Policy", "Computer Configuration",</para></listitem>
<listitem><para>"Administrative Templates", "System", "User Profiles"</para></listitem>
<listitem><para>Double-Click: "Do not check for user ownership of Roaming Profile</para></listitem>
<listitem><para>Folders"</para></listitem>
<listitem><para>Select: "Enabled"</para></listitem>
<listitem><para>Click: OK"</para></listitem>

<listitem><para>Close the whole console.  You do not need to save the settings (this
refers to the console settings rather than the policies you have
changed).</para></listitem>

<listitem><para>Reboot</para></listitem>
</itemizedlist>
</note>
</sect3>
</sect2>

<sect2>
<title>Sharing Profiles between W9x/Me and NT4/200x/XP workstations</title>

<para>
Sharing of desktop profiles between Windows versions is NOT recommended.
Desktop profiles are an evolving phenomenon and profiles for later versions
of MS Windows clients add features that may interfere with earlier versions
of MS Windows clients. Probably the more salient reason to NOT mix profiles
is that when logging off an earlier version of MS Windows the older format
of profile contents may overwrite information that belongs to the newer
version resulting in loss of profile information content when that user logs
on again with the newer version of MS Windows.
</para>

<para>
If you then want to share the same Start Menu / Desktop with W9x/Me, you will
need to specify a common location for the profiles. The smb.conf parameters
that need to be common are <emphasis>logon path</emphasis> and
<emphasis>logon home</emphasis>.
</para>

<para>
If you have this set up correctly, you will find separate user.DAT and
NTuser.DAT files in the same profile directory.
</para>

</sect2>

<sect2>
<title>Profile Migration from Windows NT4/200x Server to Samba</title>

<para>
There is nothing to stop you specifying any path that you like for the
location of users' profiles.  Therefore, you could specify that the
profile be stored on a samba server, or any other SMB server, as long as
that SMB server supports encrypted passwords.
</para>

<sect3>
<title>Windows NT4 Profile Management Tools</title>

<para>
Unfortunately, the Resource Kit information is specific to the version of MS Windows
NT4/200x. The correct resource kit is required for each platform.
</para>

<para>
Here is a quick guide:
</para>

<itemizedlist>

<listitem><para>
On your NT4 Domain Controller, right click on 'My Computer', then
select the tab labelled 'User Profiles'.
</para></listitem>

<listitem><para>
Select a user profile you want to migrate and click on it.
</para>

<note><para>I am using the term &quot;migrate&quot; lossely. You can copy a profile to
create a group profile. You can give the user 'Everyone' rights to the
profile you copy this to. That is what you need to do, since your samba
domain is not a member of a trust relationship with your NT4 PDC.</para></note>
</listitem>

	<listitem><para>Click the 'Copy To' button.</para></listitem>

	<listitem><para>In the box labelled 'Copy Profile to' add your new path, eg:
	<filename>c:\temp\foobar</filename></para></listitem>

	<listitem><para>Click on the button labelled 'Change' in the "Permitted to use" box.</para></listitem>

	<listitem><para>Click on the group 'Everyone' and then click OK. This closes the
	'chose user' box.</para></listitem>

	<listitem><para>Now click OK.</para></listitem>
</itemizedlist>

<para>
Follow the above for every profile you need to migrate.
</para>

<sect3>
<title>Side bar Notes</title>

<para>
You should obtain the SID of your NT4 domain. You can use smbpasswd to do
this. Read the man page.</para>

<para>
With Samba-3.0.0 alpha code you can import all you NT4 domain accounts
using the net samsync method. This way you can retain your profile
settings as well as all your users.
</para>

</sect3>


<sect3>
<title>moveuser.exe</title>

<para>
The W2K professional resource kit has moveuser.exe. moveuser.exe changes
the security of a profile from one user to another.  This allows the account
domain to change, and/or the user name to change.
</para>

</sect3>

<sect3>
<title>Get SID</title>

<para>
You can identify the SID by using GetSID.exe from the Windows NT Server 4.0
Resource Kit.
</para>

<para>
Windows NT 4.0 stores the local profile information in the registry under
the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
</para>

<para>
Under the ProfileList key, there will be subkeys named with the SIDs of the
users who have logged on to this computer. (To find the profile information
for the user whose locally cached profile you want to move, find the SID for
the user with the GetSID.exe utility.) Inside of the appropriate user's
subkey, you will see a string value named ProfileImagePath.
</para>

</sect3>
</sect2>
</sect1>

<sect1>
<title>Mandatory profiles</title>

<para>
The above method can be used to create mandatory profiles also. To convert
a group profile into a mandatory profile simply locate the NTUser.DAT file
in the copied profile and rename it to NTUser.MAN.
</para>

</sect1>

<sect1>
<title>Creating/Managing Group Profiles</title>

<para>
Blah goes here.
</para>
</sect1>
</chapter>