Problem
The logon of users at their Windows clients takes very long time. Sometimes up to 10 minutes.
Environment
When trying to access the server through IP address it is working fine and fast.
Additionally installing software it takes minutes until the popup for the administrator credentials comes up.
You have configured multiple networks and have separated them from each other through a blocking firewall.
Solution
If samba has multiple interfaces all interfaces are taken into account for DNS resolution. So samba replied sometimes with an IP address of the secondary interface. But this interface could not be reached by the client as the firewall blocked all traffic. Only attempts to connect with the correct IP succeeded.
Define the correct interface:
ucr set interfaces/primary=eth0
ucr set samba/interfaces/bindonly=yes
ucr set samba/interfaces="lo <interfaces/primary>"
/etc/init.d/samba restart