- Timestamp:
- 09/30/08 13:54:54 (3 months ago)
- Location:
- trunk/client/samba
- Files:
-
- 3 modified
-
ChangeLog (modified) (1 diff)
-
conf/80samba.conf (modified) (1 diff)
-
src/EBox/SambaLdapUser.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/samba/ChangeLog
r11457 r11460 3 3 It's possible to run into that scenarion depending when the user/group is 4 4 created 5 + Do not delete some domain attributes that are used to store password 6 attributes such us password length, expiration... 5 7 0.12.3 6 8 + Add configuration variable to enable/disable quota support -
trunk/client/samba/conf/80samba.conf
r11443 r11460 20 20 21 21 # enable quota support 22 enable_quota = no22 enable_quota = yes -
trunk/client/samba/src/EBox/SambaLdapUser.pm
r11457 r11460 984 984 my $sid = getSID(); 985 985 986 my %domainAttrs = %{$self->_fetchDomainAttrs($domain)}; 986 987 $self->deleteSambaDomainNameAttrs(); 987 988 $self->deleteSambaDomains(); … … 995 996 'gidNumber' => $users->lastGid, 996 997 'objectClass' => ['sambaDomain', 997 'sambaUnixidPool'] 998 'sambaUnixidPool'], 999 %domainAttrs 998 1000 ] 999 );1001 ); 1000 1002 1001 1003 my $dn = "sambaDomainName=$domain,dc=ebox"; … … 1003 1005 } 1004 1006 1007 sub _fetchDomainAttrs 1008 { 1009 my ($self, $domain) = @_; 1010 1011 my $ldap = EBox::Ldap->instance(); 1012 1013 my @attrs = qw/sambaPwdHistoryLength sambaMaxPwdAge sambaLockoutThreshold/; 1014 my $result = $ldap->search( 1015 { 1016 base => $ldap->dn(), 1017 filter => "sambaDomainName=$domain", 1018 scope => 'sub', 1019 attrs => [@attrs], 1020 } 1021 ); 1022 1023 my $entry = $result->pop_entry(); 1024 return {} unless defined($entry); 1025 my %attributes; 1026 for my $attr (@attrs) { 1027 $attributes{$attr} = $entry->get_value($attr); 1028 return {} unless defined($attributes{$attr}); 1029 } 1030 return \%attributes; 1031 } 1005 1032 1006 1033 sub deleteSambaDomainNameAttrs … … 1205 1232 base => $groupDN, 1206 1233 filter => "(&(objectclass=sambaGroupMapping)(!(sambaSID=$sid*)))", 1207 attrs => ['sambaSID' ],1234 attrs => ['sambaSID', 'cn'], 1208 1235 scope => 'sub' 1209 1236 ); 1210 1237 1211 1238 $result = $ldap->search(\%attrs); 1239 my %groupsToSkip = ('Administrators' => 1, 'Account Operators' => 1, 1240 'Print Operators' => 1, 'Backup Operators' => 1, 'Replicators' => 1); 1212 1241 1213 1242 for my $entry ($result->entries()) { 1243 next if $groupsToSkip{$entry->get_value('cn')}; 1214 1244 my $oldSID = $entry->get_value('sambaSID'); 1215 1245 my ($lastNumbers) = $oldSID =~ /.*-(\d+)$/;
