I have samba 4.0.6 as AD DC and fileserver on ubuntu 12.04 in a Mac environment. After some time the OS X clients will not connect to the server with the error message: "The file server will not allow any aditional users to log on. Try to connect again later. Restarting samba service fixes the problem temporarely.
The server is used in a little company with only 5 users all using OS X and at the time connecting using smb.
I've added "max connections = 20000" in smb.conf (as shown in end of this post), but it didn't have any effect.
# testparm smb.conf
Load smb config files from smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Unknown parameter encountered: "server role"
Ignoring unknown parameter "server role"
Unknown parameter encountered: "dns forwarder"
Ignoring unknown parameter "dns forwarder"
Processing section "[Arkiv]"
Processing section "[Internt]"
Processing section "[Kunder]"
Processing section "[Programvare]"
Processing section "[Ressurser]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = KONVOI
realm = KONVOI.LAN
template shell = /bin/bash
winbind enum users = Yes
winbind enum groups = Yes
winbind use default domain = Yes
idmap_ldb:use rfc2307 = Yes
idmap config * : backend = tdb
[Kunder]
comment = Aktive prosjekter
path = /mnt/data/Kunder
read only = No
max connections = 20000