Trying to understand upgradeprovision

Matthieu Patou mat at
Fri Feb 15 00:27:23 MST 2013

On 02/13/2013 09:31 PM, Andrew Bartlett wrote:
> Matthieu,
> I've been adding tests to help me understand upgradeprovision, what it
> can do and what it can't do.
> The branch this mail is based on is here:
> The issue I have is that I can't find any clear description of what
> --full does, and how we can safely use upgradeprovision to correct the
> ACLs that were incorrect in our 4.0.0 release.
Full will not only correct file location it will also generate a 
reference provision and add all the objects that are in the reference 
provision but not in the live one, it will also look at missing and 
changed attributes and add them (well not all because some shouldn't be 
copied but you get the idea).
> Is it the case that without --full, we only do things so clear that we
> should probably do them in dbcheck instead (and have upgradeprovision
> run dbcheck at the end?)
Well dbcheck should check the ... not a kitchen-sink
> I had been under the impression that the SD recalculation was done
> regardless, but when I run these commands:
> bin/samba-tool ldapcmp st/provision/alpha13_upgrade/private/sam.ldb
> st/provision/alpha13_upgrade_reference/private/sam.ldb --two domain
> schema --sd > /tmp/ldapcmp-upgrade_sd.txt
> bin/samba-tool ldapcmp st/provision/alpha13_upgrade_full/private/sam.ldb
> st/provision/alpha13_upgrade_reference/private/sam.ldb --two domain
> schema --sd > /tmp/ldapcmp-upgrade_full_sd.txt
> I see that the SDs are only fixed if we run with --full.  My concern is
> that this mode changes many, many other things about the database, and I
> would prefer to find a 'lighter touch' way to handle this.
Well the lighter way might be --fixdsacl
> Anyway, I include the output from those commands, in the hope that you
> can shed some light.  To reproduce, on my branch first run 'make test
> TESTS=alpha13' and the directories will be produced.
Well the results for the --full looks pretty good, just one object is 
not ok (maybe a bug ?)

'CN=ARES,OU=Domain Controllers,DC=alpha13,DC=samba,DC=corp' 
'CN=ARES,OU=Domain Controllers,DC=alpha13,DC=samba,DC=corp' 
     ACEs found only in st/provision/alpha13_upgrade_full/private/sam.ldb:
     ACEs found only in 


Matthieu Patou
Samba Team

More information about the samba-technical mailing list