Give warning rather than failure when running DCSync as SYSTEM

This commit is contained in:
Ashley Donaldson 2021-11-08 15:56:29 +11:00
parent e8a37d88d3
commit 937e208de8
No known key found for this signature in database
GPG Key ID: 70277622B54D3BCE
1 changed files with 3 additions and 3 deletions

View File

@ -174,7 +174,7 @@ class Console::CommandDispatcher::Kiwi
end
def cmd_dcsync(*args)
return unless check_is_domain_user
check_is_domain_user
if args.length != 1
print_line('Usage: dcsync <DOMAIN\user>')
@ -186,7 +186,7 @@ class Console::CommandDispatcher::Kiwi
end
def cmd_dcsync_ntlm(*args)
return unless check_is_domain_user
check_is_domain_user
if args.length != 1
print_line('Usage: dcsync_ntlm <DOMAIN\user>')
@ -541,7 +541,7 @@ protected
end
def check_is_domain_user(msg='Running as SYSTEM, function will not work.')
def check_is_domain_user(msg='Running as SYSTEM; function will only work if this computer account has replication privileges (e.g. Domain Controller)')
if client.sys.config.is_system?
print_warning(msg)
return false