26bfb0653f0e36dc8d986d135824e6150fa96e97
[gd/samba-autobuild/.git] / docs / textdocs / Recent-FAQs.txt
1 !==
2 !== Recent-FAQs.txt for Samba release 2.0.0-beta1 13 Nov 1998
3 !==
4 Contributor:    Samba-bugs@samba.anu.edu.au
5 Date:           July 5, 1998
6 Status:         Current
7
8 =============================================================================
9 Subject: Recent FAQ answers to common questions / problems
10 =============================================================================
11 Contents:       NetWkstaUserLogon
12                 Not listening for calling name
13                 System Error 1240
14                 Trapdoor UID
15                 User Access Control
16                 Using NT to Browse Samba Shares
17                 setup.exe and 16 bit programs
18                 smbclient -N
19
20 NetWkstaUserLogon
21 =================
22 FAQ answer about the new password server code:
23
24 In 1.9.18 you can disable the NetWkstaUserLogon call at compile time
25 in local.h and from 1.9.18p3 you can now disable it from an option in
26 your smb.conf.
27
28 The password server behaviour changed because we discovered that bugs
29 in some NT servers allowed anyone to login with no password if they
30 chose an account name that did not exist on the password server. The 
31 NT password server was saying "yes, it's OK to login" even when the 
32 account didn't exist at all! Adding the NetWkstaUserLogon call fixed 
33 the problem, and follows the "recommended" method that MS have 
34 recently documented for pass through authentication.
35
36 The problem now is that some NT servers (in particular NT
37 workstation?) don't support the NetWkstaUserLogon call. The call also
38 doesn't work for accounts in trust relationships.
39
40 The eventual solution for this will be to replace the password server
41 code in Samba with NT domain code as that is developed. For now you 
42 have the choice of compiling Samba either with or without the 
43 NetWkstaUserLogon call in the password server code.
44
45 In 1.9.18p3 the following was added (copied from the 1.9.18p3 release
46 notes):
47
48 In the [global] section of smb.conf :
49
50 networkstation user login
51
52 This code (submitted by Rob Nielsen) allows the code many people 
53 were having problems with that queries an NT password server to 
54 be turned off at runtime rather than compile time. Please see the 
55 documentation in the smb.conf manual page for details. This is a 
56 security option - it must only be turned off after checks have been
57 made to ensure that your NT password server does not suffer from the
58 bug this code was meant to protect against !
59
60 In 1.9.18 you can enable/disable this call in local.h. In 1.9.17p5
61 you could apply the following patch. Applying this patch will make
62 the password server code behave like the code in earlier versions
63 of Samba. If you do this then please ensure that you test to see
64 that users are prevented from logging in if they give a bogus 
65 username/password. You may have a NT server that is affected by the
66 bug that this code is designed to avoid.
67
68
69 --- password.c  1997/10/21 10:09:28     1.25.2.4
70 +++ password.c  1997/12/31 06:43:06
71 @@ -1619,6 +1619,7 @@
72         }
73  
74  
75 +#if 0
76         if (!cli_NetWkstaUserLogon(&cli,user,local_machine)) {
77                 DEBUG(1,("password server %s failed NetWkstaUserLogon\n", cli.desthost));
78                 cli_tdis(&cli);
79 @@ -1638,6 +1639,7 @@
80                 cli_tdis(&cli);
81                 return False;
82         }
83 +#endif
84  
85         DEBUG(3,("password server %s accepted the password\n", cli.desthost));
86 ===============================================================================
87
88 Not listening for calling name
89 ==============================
90
91 > Session request failed (131,129) with myname=HOBBES destname=CALVIN
92 > Not listening for calling name
93
94 If you get this when talking to a Samba box then it means that your
95 global "hosts allow" or "hosts deny" settings are causing the Samba 
96 server to refuse the connection. 
97
98 Look carefully at your "hosts allow" and "hosts deny" lines in the
99 global section of smb.conf. 
100
101 It can also be a problem with reverse DNS lookups not functioning 
102 correctly, leading to the remote host identity not being able to
103 be confirmed, but that is less likely.
104 ===============================================================================
105
106 System Error 1240
107 =================
108 System error 1240 means that the client is refusing to talk
109 to a non-encrypting server. Microsoft changed WinNT in service
110 pack 3 to refuse to connect to servers that do not support
111 SMB password encryption.
112
113 There are two main solutions:
114
115 1) enable SMB password encryption in Samba. See ENCRYPTION.txt in the 
116 Samba docs
117
118 2) disable this new behaviour in NT. See WinNT.txt in the 
119 Samba docs
120 ===============================================================================
121
122 Trapdoor UID
123 ============
124 > Log message "you appear to have a trapdoor uid system" 
125
126 This can have several causes. It might be because you are using a uid
127 or gid of 65535 or -1. This is a VERY bad idea, and is a big security
128 hole. Check carefully in your /etc/passwd file and make sure that no
129 user has uid 65535 or -1. Especially check the "nobody" user, as many
130 broken systems are shipped with nobody setup with a uid of 65535.
131
132 It might also mean that your OS has a trapdoor uid/gid system :-)
133
134 This means that once a process changes effective uid from root to
135 another user it can't go back to root. Unfortunately Samba relies on
136 being able to change effective uid from root to non-root and back
137 again to implement its security policy. If your OS has a trapdoor uid
138 system this won't work, and several things in Samba may break. Less
139 things will break if you use user or server level security instead of
140 the default share level security, but you may still strike
141 problems.
142
143 The problems don't give rise to any security holes, so don't panic,
144 but it does mean some of Samba's capabilities will be unavailable.
145 In particular you will not be able to connect to the Samba server as
146 two different uids at once. This may happen if you try to print as a
147 "guest" while accessing a share as a normal user. It may also affect
148 your ability to list the available shares as this is normally done as
149 the guest user.
150
151 Complain to your OS vendor and ask them to fix their system.
152
153 Note: the reason why 65535 is a VERY bad choice of uid and gid is that
154 it casts to -1 as a uid, and the setreuid() system call ignores (with
155 no error) uid changes to -1. This means any daemon attempting to run
156 as uid 65535 will actually run as root. This is not good!
157 ===============================================================================
158
159 User Access Control
160 ===================
161 > In windows when i set up a share in "user mode" i get the message:
162 >  "You cannot view the list of users at this time. Please try again later."
163
164 > I know you have lists of users for access and aliasing purposes, but i
165 > have read nothing to support the idea that these lists control the Domain
166 > Users List...
167
168 Samba does NOT at this time support user mode access control for Window 9x
169 of for NT. This is a priority item and requires full implementation of the NT SMB 
170 protocol calls. Samba-1.9.19 will go into alpha in about 2 months time and will
171 have a more full implementation of the NT SMB protocols to support Domain Client
172 interoperability. When we can see that this has been succesful we wil then implement
173 the NT SMB Server components. This will probably be released as Samba-2.0
174
175 Samba-1.9.18p5 is scheduled to go out within 14 days. This will close off the 1.9.18
176 branch and then opens the way to progress 1.9.19.
177
178 I hope this answers your concerns adequately.
179 ===============================================================================
180
181 Using NT to Browse Samba Shares
182 ===============================
183 > WIN-NT workstations (nt4.0, service pack 3) 
184 > samba with
185 >   security = user
186 >   encrypt passwords = yes
187 >   guest account = guest
188
189 > start the explorer on a win-nt workstation and select network. I find
190 > my unix server running samba, but I can not see the list of shares 
191 > unless I am  a user, who is known in the smbpasswd of the unix machine.
192 > The guest account "guest" exists on my unix machine. For testing I even
193 > made him a regular user with a password.
194 >
195 > With my network monitor I can see, that the win-nt workstation uses the
196 > current login, to connect to IPC$ on the samba server 
197 > (for example "administrator"), not the guest account.
198
199 This is exactly how Windows NT works. You MUST have a valid account on the Windows
200 NT box you are trying to see the resource list on. If your currently logged in
201 account details do NOT match an account on the NT machine you are trying to access
202 then you will be presented with a logon box for that machine. When you enter the
203 name of an account on that machine / domain, together with a valid password then
204 the resource list is made available. If the account details are not correct then
205 no resource list is shown.
206
207 Samba follows the behaviour of Windows NT exactly.
208
209 Warning:Warning:Warning:
210 ========================
211 Samba can be compiled with the GUEST_SESSION_SETUP option at 0,1 or 2.
212 The default is 0. If this is set to 1 or 2 then Windows NT machines that DO NOT
213 have an account on the Samba server will see the resource list. The down side of this
214 is that legitimate users may then be refused access to their legitimate resources.
215 Setting this option creates serious security holes. DO NOT DO IT. Samba has the
216 value of this option set at 0 - NOT WITHOUT REASON!!!!
217
218 ******> Warning:Warning:Warning: ****> Do not tamper with this setting!!!
219 ===============================================================================
220
221 setup.exe and 16 bit programs
222 =============================
223 Running 16 bit programs from Windows NT on a Samba mapped drive
224 ---------------------------------------------------------------
225
226 The Windows NT redirector has a bug when running against a 
227 Samba or Windows 95 mapped drive and attempting to run a
228 16 bit executable.
229
230 The problem occurs when the pathname to a 16 bit executable
231 contains a non 8.3 filename complient directory component,
232 Windows NT will fail to load the program and complain it
233 cannot find the path to the program.
234
235 It can be verified that this is a bug in Windows NT and
236 not Samba as the same problem can be reproduced exactly
237 when attempting to run the same program with the same
238 pathname from a Windows 95 server (ie. the problem still
239 exists even with no Samba server involved).
240
241 Microsoft have been made aware of this problem, it is
242 unknown if they regard it as serious enough to provide
243 a fix for this.
244
245 One of the reasons this problem is reported frequently
246 is that InstallShield setup.exe executables are frequently
247 written as 16 bit programs, and so hit this problem.
248
249 As a workaround, you may create (on a Samba server at
250 least) a symbolic link with an 8.3 complient name to 
251 the non 8.3 complient directory name, and then the 16
252 bit program will run. Alternatively, use the 8.3
253 complient mangled name to specify the path to run
254 the binary.
255
256 This will be fixed when Samba adds the NT-specific
257 SMB calls (currently targeted for the next major
258 Samba release), as once the NT SMB calls are used
259 this problem no longer occurs (which is why the
260 problem doesn't occur when running against a drive
261 mapped to a Windows NT server).
262
263 Regards,
264
265         Jeremy Allison.
266         Samba Team.
267 ===============================================================================
268
269 smbclient -N
270 ============
271 > When getting the list of shares available on a host using the command
272 >   smbclient -N -L <server>
273 > the program always prompts for the password if the server is a Samba server.
274 > It also ignores the "-N" argument when querying some (but not all) of our
275 > NT servers.
276
277 No, it does not ignore -N, it is just that your server rejected the 
278 null password in the connection, so smbclient prompts for a password
279 to try again.
280
281 To get the behaviour that you probably want use 
282         smbclient -L host -U%
283
284 this will set both the username and password to null, which is
285 an anonymous login for SMB. Using -N would only set the password
286 to null, and this is not accepted as an anonymous login for most
287 SMB servers.
288 ===============================================================================
289