summaryrefslogtreecommitdiffstats
path: root/python/samba/dbchecker.py
Commit message (Collapse)AuthorAgeFilesLines
* dbcheck: Add check and test for various invalid userParameters valuesAndrew Bartlett2014-07-091-0/+90
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077 Change-Id: I6f2f4169856ce78c62e3a7e74b48520cca9cb9ae Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dbcheck: Directly call dn.get_rdn_{val,name}() for clarity and consistencyAndrew Bartlett2014-05-021-18/+13
| | | | | | | | | | | | When looking for incorrect name values, this improves the previous code by avoiding one more manual parse step, and uses less cryptic variable names. Andrew Bartlett Change-Id: Iff8e571a6359a67bf173f729dc12b8787292b3cb Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* dbchecker: verify and fix broken dn valuesStefan Metzmacher2014-05-021-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | With older Samba versions (4.0.x) the following could happen: - On account was created on DC1 - It was replicated to DC2 - The connection between the dcs is offline - The account gets modified on DC2 - The account gets deleted on DC1 - The connection becomes online again - DC1 replicates the modification from DC2, this resets the dn to the original value. 'name' and 'cn' are correct (with '\nDEL${GUID}'), but 'dn' is wrong. - DC2 replicates the deletion from DC1. this doesn't include a changed dn as DC1 had a bug. 'name' is correct (with '\nDEL${GUID}'), but 'cn' and 'dn' are wrong. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10536 Change-Id: Ia70a6c12e0ff0d4c2c8100cb1d8f3c6422b65591 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dbchecker: make the deleted objects container detection more genericStefan Metzmacher2014-05-021-2/+8
| | | | | | Change-Id: I282ad887c41412e25fdf73476e405f4e88e0b239 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool dbcheck: handle missing objectClassFelix Botner2014-03-271-0/+31
| | | | | | | | | | | | | | In several cases we have seen objects without the objectClass attribute. Here the suggestion for a patch to find such objects in "samba-tool dbcheck" with the option to delete them. (patch improved by Andrew Bartlett to suggest DRS re-replication) Signed-off-by: Felix Botner <botner@univention.de> Change-Id: I8eb0d191a2089271a9af5884d6bfbf173a5c85c6 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dbcheck: Ensure dbcheck can operate with --attrs setAndrew Bartlett2014-03-211-1/+1
| | | | | | | This also includes a test to ensure we do not regress on this point. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dbcheck: Add back the elements that were wrongly removed from CN=Deleted ObjectsAndrew Bartlett2013-09-241-0/+66
| | | | | | | | | | | | | | This is the final part of the fix for the issue in Samba 4.1 pre-release tree where we would wrongly delete the Deleted Objects container during a join. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Sep 24 09:31:37 CEST 2013 on sn-devel-104
* dbcheck: Ensure to always increase the error_countAndrew Bartlett2013-09-241-0/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* dbcheck: Look for and fix the all-zero invocationID in replPropertyMetaDataAndrew Bartlett2013-09-221-0/+68
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* samba-tool dbcheck: Correctly remove deleted DNs in dbcheckAndrew Bartlett2013-07-301-1/+1
| | | | | | | | | | | | The previous pattern never matched, as it was a typo. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jul 30 12:55:00 CEST 2013 on sn-devel-104
* samba-tool dbcheck: Use dsdb.DS_GUID_DELETED_OBJECTS_CONTAINER rather than ↵Andrew Bartlett2013-05-161-1/+1
| | | | | | | | | | the literal value This is better practice. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* samba-tool dbcheck: Allow dbcheck to correct an nTSecurityDescriptor without ↵Andrew Bartlett2013-03-251-0/+41
| | | | | | | | | | | | | | an owner or group This is done by making a modification to the SD, which triggers it to be filled in if we have the correct session_info established on the DB. However, we normally want dbcheck running as system, so we wrap the session_info set around this operation only. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* samba-tool dbcheck: Add --reset-well-known-aclsAndrew Bartlett2013-03-251-2/+66
| | | | | | | | | | This will allow an upgrade from Samba 4.0.0 without needing to run samba_upgradeprovision, which for now is not the preferred upgrade tool. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* samba-tool dbcheck: fix msDS-HasInstantiatedNCs attributes to match ↵Andrew Bartlett2013-03-041-1/+35
| | | | | | | | | | instanceType on our ntdsDSA This value is only a link to the local value of intanceType on our server, so only fix it for our server. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* samba-tool dbcheck: fix comment on err_wrong_sdAndrew Bartlett2013-03-021-2/+1
| | | | Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij2013-03-021-0/+947
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104