Skip to content

addcomputer

Description

This script will add a computer account to the domain and set its password. Allows to use SAMR over SMB (this way is used by modern Windows computer when adding machines through the GUI) and LDAPS. Plain LDAP is not supported, as it doesn't allow setting the password.

Usage

addcomputer.py -computer-name 'QU35T$' -computer-pass 'Password123!' -dc-host dc1.qu35t.pw qu35t.pw\svc_user:password
addcomputer.py -computer-name 'QU35T$' -computer-pass 'Password456!' -dc-host dc1.qu35t.pw -no-add qu35t.pw\svc_user:password
addcomputer.py -computer-name 'QU35T$' -dc-host dc1.qu35t.pw -delete qu35t.pw\svc_user:password 

Authentication

addcomputer.py -hashes LMHASH:NTHASH -dc-ip 10.10.10.10 qu35t.pw/svc_user
addcomputer.py -dc-ip 10.10.10.10 -no-pass qu35t.pw/svc_user
export KRB5CCNAME=svc_user.ccache
addcomputer.py -k -no-pass -dc-host dc1.qu35t.pw qu35t.pw/svc_user

References