HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

addcomputer.py — Add a computer account to a domain. Part of the Impacket suite. More information: <https://github.co

Submitted by: @import:tldr-pages··
0
Viewed 0 times
computercommandaccountdomaincliaddaddcomputer.pypart

Problem

How to use the addcomputer.py command: Add a computer account to a domain. Part of the Impacket suite. More information: <https://github.com/fortra/impacket>.

Solution

addcomputer.py — Add a computer account to a domain. Part of the Impacket suite. More information: <https://github.com/fortra/impacket>.

Add a computer with a specific name and password:
addcomputer.py -computer-name {{COMPUTER_NAME$}} -computer-pass {{computer_password}} {{domain}}/{{username}}:{{password}}


Only set a new password on an existing computer:
addcomputer.py -no-add -computer-name {{COMPUTER_NAME$}} -computer-pass {{computer_password}} {{domain}}/{{username}}:{{password}}


Delete an existing computer account:
addcomputer.py -delete -computer-name {{COMPUTER_NAME$}} {{domain}}/{{username}}:{{password}}


Add computer using Kerberos authentication:
addcomputer.py -k -no-pass {{domain}}/{{username}}@{{hostname}}


Add computer via LDAPS (port 636) instead of SAMR (port 445):
addcomputer.py -method LDAPS -port 636 {{domain}}/{{username}}:{{password}}


Specify exact domain controller when multiple DCs exist:
addcomputer.py -dc-host {{hostname}} {{domain}}/{{username}}:{{password}}

Code Snippets

Add a computer with a specific name and password

addcomputer.py -computer-name {{COMPUTER_NAME$}} -computer-pass {{computer_password}} {{domain}}/{{username}}:{{password}}

Only set a new password on an existing computer

addcomputer.py -no-add -computer-name {{COMPUTER_NAME$}} -computer-pass {{computer_password}} {{domain}}/{{username}}:{{password}}

Delete an existing computer account

addcomputer.py -delete -computer-name {{COMPUTER_NAME$}} {{domain}}/{{username}}:{{password}}

Add computer using Kerberos authentication

addcomputer.py -k -no-pass {{domain}}/{{username}}@{{hostname}}

Add computer via LDAPS (port 636) instead of SAMR (port 445)

addcomputer.py -method LDAPS -port 636 {{domain}}/{{username}}:{{password}}

Context

tldr-pages: common/addcomputer.py

Revisions (0)

No revisions yet.