# should ctdb manage starting/stopping the Samba service for you?
# default is to not manage Samba
CTDB_MANAGES_SAMBA=yes
-# should ctdb manage starting/stopping the winbind service for you?
-# default is autodetect
-CTDB_MANAGES_WINBIND=no
+# should ctdb manage starting/stopping Winbind service?
+# if left comented out then it will be autodetected based on smb.conf
+CTDB_MANAGES_WINBIND=!!|"yes" if self.config.get("package:ctdb", "auth_method") == "winbind" else "no"!!
# should ctdb monitor GPFS filesystems and disks
CTDB_MANAGES_GPFS=yes
# you may wish to raise the file descriptor limit for ctdb
session optional pam_keyinit.so force revoke
auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
#auth required pam_shells.so
+!!|"" if self.config.get("package:vsftpd", "auth_method") == "winbind" else "#"!!auth sufficient pam_winbind.so
auth include system-auth
+!!|"" if self.config.get("package:vsftpd", "auth_method") == "winbind" else "#"!!account sufficient pam_winbind.so
account include system-auth
session include system-auth
session required pam_loginuid.so
ctdb:registry.tdb=yes
private dir=!!gpfs_default_mountpoint!!/.ctdb/
- security = user
- auth methods = guest sam
+ security = !!|"ADS" if self.config.get("package:samba", "auth_method") == "winbind" else "USER"!!
+ auth methods = guest sam !!|"winbind" if self.config.get("package:samba", "auth_method") == "winbind" else ""!!
netbios name = !!cluster!!
workgroup = !!workgroup!!
gpfs:leases = yes
passdb backend = tdbsam
preferred master = no
+ !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!idmap backend = tdb2
+ !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!idmap:cache = no
+ !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!idmap gid = 10000000-11000000
+ !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!idmap uid = 10000000-11000000
kernel oplocks = yes
syslog = 1
host msdfs = no
nfs4:sidmap = /etc/samba/sidmap.tdb
map readonly = no
ea support = yes
+ !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!groupdb:backend = tdb
+ !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!winbind:online check timeout = 30
+ !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!template shell = /usr/bin/rssh
+ !!|"" if self.config.get("package:samba", "auth_method") == "winbind" else "#"!!template homedir = !!chroot_dir!!
dmapi support = no
!!%export:format("[%s]\n\tpath = %s\n\tcomment = %s\n\tguest ok = yes\n\tread only = no\n\tbrowseable = yes\n\n", ["name", "directory", "comment"])!!