configuration-templates – Blame information for rev 97
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
95 | office | 1 | ########################################################################### |
2 | ## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ## |
||
3 | ## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ## |
||
4 | ## rights of fair usage, the disclaimer and warranty conditions. ## |
||
5 | ########################################################################### |
||
6 | ## Optimized standalone configuration template for Samba servers. ## |
||
7 | ## ## |
||
8 | ## Ideal for: ## |
||
9 | ## * Virtual machine file sharing ## |
||
10 | ## ## |
||
11 | ## Requirements: ## |
||
12 | ## * Samba 4.x ## |
||
97 | office | 13 | ## * smbldap-tools ## |
95 | office | 14 | ## ## |
15 | ## File placement layout: ## |
||
16 | ## / ## |
||
17 | ## `-- etc ## |
||
18 | ## `-- samba ## |
||
19 | ## |-- smb.conf ## |
||
20 | ## |-- smb.conf.local ## |
||
21 | ## |-- smb.conf.share ## |
||
22 | ## `-- smb.conf.ldap ## |
||
23 | ## ## |
||
24 | ## Files Description: ## |
||
25 | ## * /etc/samba/smb.conf (main configuration file) ## |
||
26 | ## * /etc/samba/smb.conf.local (this file) ## |
||
27 | ## * /etc/samba/smb.conf.share (samba shares go here) ## |
||
28 | ## ## |
||
29 | ########################################################################### |
||
30 | |||
31 | [global] |
||
32 | # Configuration for LDAP authentication backend. |
||
33 | # The setup assumes that all samba entries are children of the "samba" |
||
34 | # organizational unit. |
||
97 | office | 35 | server role = classic primary domain controller |
95 | office | 36 | passdb backend = ldapsam:ldap://example.com |
37 | ldap suffix = ou=samba,dc=example,dc=com |
||
38 | ldap admin dn = cn=admin,dc=example,dc=com |
||
39 | ldap ssl = off |
||
40 | ldap user suffix = ou=People |
||
41 | ldap group suffix = ou=Groups |
||
42 | ldap machine suffix = ou=Computers |
||
43 | ldap idmap suffix = ou=Idmap |
||
97 | office | 44 | ldap password sync = yes |
45 | # Scripts - requires smbldap-tools to be installed. |
||
46 | add user script = /usr/sbin/smbldap-useradd -m '%u' -t 1 |
||
47 | rename user script = /usr/sbin/smbldap-usermod -r '%unew' '%uold' |
||
48 | delete user script = /usr/sbin/smbldap-userdel '%u' |
||
49 | set primary group script = /usr/sbin/smbldap-usermod -g '%g' '%u' |
||
50 | add group script = /usr/sbin/smbldap-groupadd -p '%g' |
||
51 | delete group script = /usr/sbin/smbldap-groupdel '%g' |
||
52 | add user to group script = /usr/sbin/smbldap-groupmod -m '%u' '%g' |
||
53 | delete user from group script = /usr/sbin/smbldap-groupmod -x '%u' '%g' |
||
54 | add machine script = /usr/sbin/smbldap-useradd -w '%u' -t 1 |