0001-smb.conf-always-use-nss-idmap-backend-for-local-user.patch

Davide Principi, 08/28/2014 11:01 AM

Download (1.93 KB)

View differences:

root/etc/e-smith/templates/etc/samba/smb.conf/10global
15 15
deadtime = { int($smb{DeadTime}) }
16 16

  
17 17
workgroup = { 
18
   $defaultWorkgroup = 'WORKGROUP';
18 19
   if($smb{ServerRole} =~ /^(PDC|ADS)$/) {
19
       my $defaultDomain = uc((split('\.', $DomainName))[0]);
20
       $workgroup = $smb{Workgroup} || $defaultDomain;
21
   } else {
22
       $workgroup = 'WORKGROUP';
20
       $defaultWorkgroup = uc((split('\.', $DomainName))[0]);
23 21
   }
22
   $workgroup = $smb{Workgroup} || $defaultWorkgroup;
24 23
   return $workgroup;
25 24
}
26 25
netbios aliases = { join(' ', @netbiosAliasList) }
......
56 55
idmap config * : ldap_base_dn = ou=Idmap,{$LdapInternalDomainSuffix}
57 56
idmap config * : ldap_user_dn = cn=samba,{$LdapInternalDomainSuffix}
58 57
idmap config * : range = 50000-99999
59
{ $smb{ServerRole} eq 'ADS' ? '# ' : '' }idmap config {$workgroup} : range = 0 - 9999
60
{ $smb{ServerRole} eq 'ADS' ? '# ' : '' }idmap config {$workgroup} : backend = nss
58
idmap config { $smb{ServerRole} eq 'PDC' ? $workgroup : uc($SystemName) } : range = 0 - 9999
59
idmap config { $smb{ServerRole} eq 'PDC' ? $workgroup : uc($SystemName) } : backend = nss
61 60
obey pam restrictions = yes
62 61

  
63 62
; Invoked only if a passwd entry is missing:
64
-