Samba and Terminal Server, V1.06, October 2007
17
Using the [homes] share definition, Terminal Server sees the service name as
\\EMONSTER\BUFFY. File access and file locking tasks perform correctly.
When configuring Samba for home shares with Terminal Server usage, it is best to avoid defining
a share mnemonic with a substitution variable in the path (previous example). The standard
Samba [homes] feature is a more reliable option when used with Terminal Server.
5.4 MAX_CONNECTIONS
MAX_CONNECTIONS is a Samba static data structure that defines the number of services that
any one smbd process can have open simultaneously. The default value is 128, which means
that no client can have more than 128 shares open. In most cases this is a reasonable limit, but
for Terminal Server connections it can be exhausted. An actual case example of 32 clients on a
single Terminal Server was discovered when each client opened 4 shares at startup (the Terminal
Server client session startup). The 33
rd
user could not connect because MAX_CONNECTIONS had
been exhausted for that smbd process:
32(clients) * 4(shares) = 128(MAX_CONNECTIONS)
Users of open source Samba will have to recompile with MAX_CONNECTIONS (in conn.c) set to a
larger number. Samba 3.0.2 has been enhanced to automatically increase MAX_CONNECTIONS
when the default limit is exhausted.
When using the Samba “netbios aliases =” workaround or the Terminal Services hosts file for
Samba aliases, the MAX_CONNECTIONS issue does not occur (when each Terminal Server user is
allocated a separate smbd process).
Note: Samba 3.0.2 was enhanced to eliminate the maximum (128) issue.