1 Samba now supports domain logons, network logon scripts and user profiles.
2 The support is still experimental, but it seems to work.
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.
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
13 Using these features you can make your clients verify their logon via
14 the Samba server, make clients run a batch file when they logon to
15 the network and download their preferences, desktop and start menu.
18 To use domain logons and profiles you need to do the following:
20 1) Setup nmbd and smbd and configure the smb.conf so that Samba is
21 acting as the master browser. See INSTALL.txt and BROWSING.txt for
24 2) create a share called [netlogon] in your smb.conf. This share should
25 be readable by all users, and probably should not be writeable. This
26 share will hold your network logon scripts, and the CONFIG.POL file
27 (Note: for details on the CONFIG.POL file, refer to the Microsoft
28 Windows NT Administration documentation. The format of these files
29 is not known, so you will need to use Microsoft tools.)
31 For example I have used:
34 path = /data/dos/netlogon
38 Note that it is important that this share is not writeable by ordinary
39 users, in a secure environment: ordinary users should not be allowed
40 to modify or add files that another user's computer would then download
43 3) in the [global] section of smb.conf set the following:
48 the choice of batch file is, of course, up to you. The above would
49 give each user a separate batch file as the %U will be changed to
50 their username automatically. The other standard % macros may also be
51 used. You can make the batch files come from a subdirectory by using
54 logon script = scripts\%U.bat
56 4) create the batch files to be run when the user logs in. If the batch
57 file doesn't exist then no batch file will be run.
59 In the batch files you need to be careful to use DOS style cr/lf line
60 endings. If you don't then DOS may get confused. I suggest you use a
61 DOS editor to remotely edit the files if you don't know how to produce
62 DOS style files under unix.
64 5) Use smbclient with the -U option for some users to make sure that
65 the \\server\NETLOGON share is available, the batch files are visible
66 and they are readable by the users.
68 6) you will probabaly find that your clients automatically mount the
69 \\SERVER\NETLOGON share as drive z: while logging in. You can put some
70 useful programs there to execute from the batch files.
72 NOTE: You must be using "security = user" or "security = server" for
73 domain logons to work correctly. Share level security won't work
79 1) in the [global] section of smb.conf set the following:
81 logon path = \\profileserver\profileshare\profilepath\%U
83 The default for this option is \\%L\%U, namely \\sambaserver\username,
84 The \\L%\%U services is created automatically by the [homes] service.
86 If you are using a samba server for the profiles, you _must_ make the
87 share specified in the logon path browseable. Windows 95 appears to
88 check that it can see the share and any subdirectories within that share
89 specified by the logon path option, rather than just connecting straight
92 When a user first logs in on Windows 95, the file user.dat is created,
93 as are folders "start menu", "desktop", "programs" and "nethood".
94 These directories and their contents will be merged with the local
95 versions stored in c:\windows\profiles\username on subsequent logins,
96 taking the most recent from each.
98 The user.dat file contains all the user's preferences. If you wish to
99 enforce a set of preferences, rename their user.dat file to user.man,
100 and deny them write access to the file.
102 2) On the Windows 95 machine, go to Control Panel | Passwords and
103 select the User Profiles tab. Select the required level of
104 roaming preferences. Press OK, but do _not_ allow the computer
107 3) On the Windows 95 machine, go to Control Panel | Network |
108 Client for Microsoft Networks | Preferences. Select 'Log on to
109 NT Domain'. Press OK, and this time allow the computer to reboot.
111 You will now find that the Microsoft Networks Login box contains
112 [user, password, domain] instead of just [user, password]. Type in
113 the samba server's domain name (or any other domain known to exist),
114 user name and user's password.
116 Once the user has been successfully validated, the Windows 95 machine
117 will inform you that 'The user has not logged on before' and asks you
118 if you wish to save the user's preferences? Select 'yes'.
120 Once the Windows 95 client comes up with the desktop, you should be able
121 to examine the contents of the directory specified in the "logon path"
122 (the default is \\samba_server\username) and verify that the "desktop",
123 "start menu", "programs" and "nethood" folders have been created.
125 These folders will be cached locally on the client, and updated when
126 the user logs off (if you haven't made them read-only by then :-).
129 If you have problems creating user profiles, you can reset the user's
130 local desktop cache, as shown below. When this user then next logs in,
131 they will be told that they are logging in "for the first time".
134 1) instead of logging in under the [user, password, domain] dialog],
137 2) run the regedit.exe program, and look in:
139 HKEY_LOCAL_MACHINE\Windows\CurrentVersion\ProfileList
141 you will find an entry, for each user, of ProfilePath. Note the
142 contents of this key (likely to be c:\windows\profiles\username),
143 then delete the key ProfilePath for the required user.
145 [Exit the registry editor].
147 3) WARNING - before deleting the contents of the directory listed in
148 the ProfilePath (this is likely to be c:\windows\profiles\username),
149 ask them if they have any important files stored on their desktop
150 or in their start menu. delete the contents of the directory
151 ProfilePath (making a backup if any of the files are needed).
153 This will have the effect of removing the local (read-only hidden
154 system file) user.dat in their profile directory, as well as the
155 local "desktop", "nethood", "start menu" and "programs" folders.
157 4) search for the user's .PWL password-cacheing file in the c:\windows
158 directory, and delete it.
160 5) log off the windows 95 client.
162 6) check the contents of the profile path (see "logon path" described
163 above), and delete the user.dat or user.man file for the user,
164 making a backup if required.
167 If all else fails, increase samba's debug log levels to between 3 and 10,
168 and / or run a packet trace program such as tcpdump or netmon.exe, and
169 look for any error reports.