If you read our previous article Zentyal 3.2 LDAP Authentication you may note that this method no longer works with the 4.x branches of Zentyal Server. Zentyal Server now provides a full drop in replacement for AD(Microsoft Active Directory) using Samab4. So lets get down to it. If you need to authenticate other applications against Zentyal, such as a Redmine, OpenVPN or Pfsense you no longer need to make any adjustments to Zentyal as you did in branches prior to 4.0. Samba uses the port 389, and as seen below, 4.x branches of Zentyal now allow external connections by default on internal networks.
It is important to note that in order to authenticate against Samba4, you will need to update the Administrator password in Zentyal Users and Computers and then use the Administrative account for your connection to Samba.