{

    if ($smb{ServerRole} eq 'standalone' ||
    $smb{ServerRole} eq 'classic primary domain controller') {

        'passdb backend = smbpasswd:/etc/samba/smbpasswd';
    }
    
##OLD Template from pre samba 4
#Set the Samba user account dbase backend
#    if ( ($ldap{Authentication} || 'disabled') eq 'enabled')
#    {
#        my $base = esmith::util::ldapBase ($DomainName);
#        $OUT .= <<EOF;
#passdb backend = ldapsam:ldap://localhost
#
#ldap admin dn = cn=root,$base
#ldap suffix = $base
#ldap group suffix = ou=Groups
#ldap user suffix = ou=Users
#ldap machine suffix = ou=Computers
#ldap delete dn = no
#ldap passwd sync = yes
#ldap ssl = off
#EOF
#    }
#    else
#    {
#        $OUT .= <<EOF;
#passdb backend = smbpasswd:/etc/samba/smbpasswd
#EOF
#    }
}
