Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python2.7 /
dist-packages /
samba /
netcmd /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.py
7.78
KB
-rw-r--r--
2015-07-21 11:47
__init__.pyc
8.27
KB
-rw-r--r--
2021-05-01 07:33
common.py
2.38
KB
-rw-r--r--
2015-07-21 11:47
common.pyc
2.28
KB
-rw-r--r--
2021-05-01 07:33
dbcheck.py
5.76
KB
-rw-r--r--
2015-07-21 11:47
dbcheck.pyc
4.56
KB
-rw-r--r--
2021-05-01 07:33
delegation.py
10.88
KB
-rw-r--r--
2015-07-21 11:47
delegation.pyc
9.22
KB
-rw-r--r--
2021-05-01 07:33
dns.py
47.6
KB
-rw-r--r--
2015-07-21 11:47
dns.pyc
42.92
KB
-rw-r--r--
2021-05-01 07:33
domain.py
168.08
KB
-rw-r--r--
2016-02-22 10:36
domain.pyc
103.79
KB
-rw-r--r--
2021-05-01 07:33
drs.py
21.21
KB
-rw-r--r--
2015-07-21 11:47
drs.pyc
19.73
KB
-rw-r--r--
2021-05-01 07:33
dsacl.py
7.37
KB
-rw-r--r--
2015-07-21 11:47
dsacl.pyc
6.67
KB
-rw-r--r--
2021-05-01 07:33
fsmo.py
19.43
KB
-rw-r--r--
2016-06-14 09:37
fsmo.pyc
14.09
KB
-rw-r--r--
2021-05-01 07:33
gpo.py
39.7
KB
-rw-r--r--
2015-07-21 11:47
gpo.pyc
33.57
KB
-rw-r--r--
2021-05-01 07:33
group.py
17.99
KB
-rw-r--r--
2015-07-21 11:47
group.pyc
16.38
KB
-rw-r--r--
2021-05-01 07:33
ldapcmp.py
40.44
KB
-rw-r--r--
2015-07-21 11:47
ldapcmp.pyc
31.27
KB
-rw-r--r--
2021-05-01 07:33
main.py
2.53
KB
-rw-r--r--
2015-07-21 11:47
main.pyc
2.46
KB
-rw-r--r--
2021-05-01 07:33
ntacl.py
9.92
KB
-rw-r--r--
2015-07-21 11:47
ntacl.pyc
8.89
KB
-rw-r--r--
2021-05-01 07:33
processes.py
2.71
KB
-rw-r--r--
2015-07-21 11:47
processes.pyc
2.03
KB
-rw-r--r--
2021-05-01 07:33
rodc.py
3.97
KB
-rw-r--r--
2015-07-21 11:47
rodc.pyc
3.6
KB
-rw-r--r--
2021-05-01 07:33
sites.py
3.35
KB
-rw-r--r--
2015-07-21 11:47
sites.pyc
3.34
KB
-rw-r--r--
2021-05-01 07:33
spn.py
7.42
KB
-rw-r--r--
2015-07-21 11:47
spn.pyc
6.08
KB
-rw-r--r--
2021-05-01 07:33
testparm.py
8.34
KB
-rw-r--r--
2015-07-21 11:47
testparm.pyc
6.2
KB
-rw-r--r--
2021-05-01 07:33
time.py
1.96
KB
-rw-r--r--
2015-07-21 11:47
time.pyc
1.8
KB
-rw-r--r--
2021-05-01 07:33
user.py
29.61
KB
-rw-r--r--
2021-04-14 17:48
user.pyc
27.37
KB
-rw-r--r--
2021-05-01 07:33
vampire.py
1.9
KB
-rw-r--r--
2015-07-21 11:47
vampire.pyc
1.78
KB
-rw-r--r--
2021-05-01 07:33
Save
Rename
# Samba4 AD database checker # # Copyright (C) Andrew Tridgell 2011 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # import ldb, sys import samba.getopt as options from samba.auth import system_session from samba.samdb import SamDB from samba.netcmd import ( Command, CommandError, Option ) from samba.dbchecker import dbcheck class cmd_dbcheck(Command): """Check local AD database for errors.""" synopsis = "%prog [<DN>] [options]" takes_optiongroups = { "sambaopts": options.SambaOptions, "versionopts": options.VersionOptions, "credopts": options.CredentialsOptionsDouble, } takes_args = ["DN?"] takes_options = [ Option("--scope", dest="scope", default="SUB", help="Pass search scope that builds DN list. Options: SUB, ONE, BASE"), Option("--fix", dest="fix", default=False, action='store_true', help='Fix any errors found'), Option("--yes", dest="yes", default=False, action='store_true', help="don't confirm changes, just do them all as a single transaction"), Option("--cross-ncs", dest="cross_ncs", default=False, action='store_true', help="cross naming context boundaries"), Option("-v", "--verbose", dest="verbose", action="store_true", default=False, help="Print more details of checking"), Option("--quiet", dest="quiet", action="store_true", default=False, help="don't print details of checking"), Option("--attrs", dest="attrs", default=None, help="list of attributes to check (space separated)"), Option("--reindex", dest="reindex", default=False, action="store_true", help="force database re-index"), Option("--force-modules", dest="force_modules", default=False, action="store_true", help="force loading of Samba modules and ignore the @MODULES record (for very old databases)"), Option("--reset-well-known-acls", dest="reset_well_known_acls", default=False, action="store_true", help="reset ACLs on objects with well known default ACL values to the default"), Option("-H", "--URL", help="LDB URL for database or target server (defaults to local SAM database)", type=str, metavar="URL", dest="H"), ] def run(self, DN=None, H=None, verbose=False, fix=False, yes=False, cross_ncs=False, quiet=False, scope="SUB", credopts=None, sambaopts=None, versionopts=None, attrs=None, reindex=False, force_modules=False, reset_well_known_acls=False): lp = sambaopts.get_loadparm() over_ldap = H is not None and H.startswith('ldap') if over_ldap: creds = credopts.get_credentials(lp, fallback_machine=True) else: creds = None if force_modules: samdb = SamDB(session_info=system_session(), url=H, credentials=creds, lp=lp, options=["modules=samba_dsdb"]) else: try: samdb = SamDB(session_info=system_session(), url=H, credentials=creds, lp=lp) except: raise CommandError("Failed to connect to DB at %s. If this is a really old sam.ldb (before alpha9), then try again with --force-modules" % H) if H is None or not over_ldap: samdb_schema = samdb else: samdb_schema = SamDB(session_info=system_session(), url=None, credentials=creds, lp=lp) scope_map = { "SUB": ldb.SCOPE_SUBTREE, "BASE": ldb.SCOPE_BASE, "ONE":ldb.SCOPE_ONELEVEL } scope = scope.upper() if not scope in scope_map: raise CommandError("Unknown scope %s" % scope) search_scope = scope_map[scope] controls = ['show_deleted:1'] if over_ldap: controls.append('paged_results:1:1000') if cross_ncs: controls.append("search_options:1:2") if not attrs: attrs = ['*'] else: attrs = attrs.split() started_transaction = False if yes and fix: samdb.transaction_start() started_transaction = True try: chk = dbcheck(samdb, samdb_schema=samdb_schema, verbose=verbose, fix=fix, yes=yes, quiet=quiet, in_transaction=started_transaction, reset_well_known_acls=reset_well_known_acls) if reindex: self.outf.write("Re-indexing...\n") error_count = 0 if chk.reindex_database(): self.outf.write("completed re-index OK\n") elif force_modules: self.outf.write("Resetting @MODULES...\n") error_count = 0 if chk.reset_modules(): self.outf.write("completed @MODULES reset OK\n") else: error_count = chk.check_database(DN=DN, scope=search_scope, controls=controls, attrs=attrs) except: if started_transaction: samdb.transaction_cancel() raise if started_transaction: samdb.transaction_commit() if error_count != 0: sys.exit(1)