added reference on CONFIG.POL being loaded from the root of the [netlogon]
[jra/samba/.git] / docs / textdocs / DOMAIN.txt
1 Samba now supports domain logons and network logon scripts. The
2 support is still experimental, but it seems to work.
3
4 The support is also not complete. Samba does not yet support the
5 sharing of the SAM database with other systems yet, or remote
6 administration. Support for these kind of things should be added
7 sometime in the future.
8
9 The domain support only works for WfWg and Win95 clients. Support for
10 NT and OS/2 clients is still being worked on and currently does not
11 work. 
12
13 Using these features you can make your clients verify their logon via
14 the Samba server and make clients run a batch file when they logon to
15 the network. The latter is particularly useful.
16
17 To use domain logons you need to do the following:
18
19 1) Setup nmbd and smbd and configure the smb.conf so that Samba is
20 acting as the master browser. See INSTALL.txt and BROWSING.txt for
21 details. 
22
23 2) create a share called [netlogon] in your smb.conf. This share should
24 be readable by all users, and probably should not be writeable. This
25 share will hold your network logon scripts, and the CONFIG.POL file
26 (Note: for details on the CONFIG.POL file, refer to the Microsoft
27 Windows NT Server Help documentation)
28
29 For example I have used:
30
31    [netlogon]
32     path = /data/dos/netlogon
33     writeable = no
34     guest ok = yes
35
36
37 3) in the [global] section of smb.conf set the following:
38
39    domain logons = yes
40    logon script = %U.bat
41
42 the choice of batch file is, of course, up to you. The above would
43 give each user a separate batch file as the %U will be changed to
44 their username automatically. The other standard % macros may also be
45 used. You can make the batch files come from a subdirectory by using
46 soemthing like:
47
48    logon script = scripts\%U.bat
49
50 4) create the batch files to be run when the user logs in. If the batch
51 file doesn't exist then no batch file will be run. 
52
53 In the batch files you need to be careful to use DOS style cr/lf line
54 endings. If you don't then DOS may get confused. I suggest you use a
55 DOS editor to remotely edit the files if you don't know how to produce
56 DOS style files under unix.
57
58 5) Use smbclient with the -U option for some users to make sure that
59 the \\server\NETLOGON share is available, the batch files are visible
60 and they are readable by the users.
61
62 6) you will probabaly find that your clients automatically mount the
63 \\SERVER\NETLOGON share as drive z: while logging in. You can put some
64 useful programs there to execute from the batch files.
65
66
67 NOTE: You must be using "security = user" or "security = server" for
68 domain logons to work correctly. Share level security won't work
69 correctly.
70
71