[global]
        security = ADS
        workgroup = PERSONALE
        realm  = PERSONALE.DIR.UNIBO.IT
        server string = %v
        encrypt passwords = Yes

        client use spnego = Yes
        client ntlmv2 auth = Yes
	restrict anonymous = 2

        log file = /var/log/samba/log.%m
        log level = 3
        max log size = 50
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        local master = No
        dns proxy = No

#        winbind separator = -
        winbind enum users = No
        winbind enum groups = No
        winbind offline logon = Yes
        winbind nested groups = Yes
        winbind normalize names = Yes
        winbind refresh tickets = Yes
        winbind use default domain = yes
        winbind uid = 100000-100000000
        winbind gid = 100000-100000000

#        idmap domains = PERSONALE STUDENTI
        idmap config PERSONALE:default = no
	idmap config STUDENTI:default = yes

        idmap config PERSONALE:backend = rid
        idmap config PERSONALE:base_rid  = 500
        idmap config PERSONALE:range = 100000 - 49999999
        idmap config STUDENTI:backend = rid
        idmap config STUDENTI:base_rid  = 500
        idmap config STUDENTI:range = 50000000 - 99999999

        template homedir = /home/%D/%U
        template shell = /bin/bash
