krbrelayx icon indicating copy to clipboard operation
krbrelayx copied to clipboard

LDAP Operation failed: noSuchObject

Open Dreikana opened this issue 11 months ago • 2 comments
trafficstars

Hey! This is the error when I try to add a new DNS entry using dnstool.py

python3 dnstool.py -u domain.com\\user -p 'password' -r test.domain.com -a add -d 10.10.1.15 ldap://10.10.1.1

[-] Connecting to host...
[-] Binding to host
[+] Bind OK
[-] Adding new record
[!] LDAP operation failed. Message returned from server: noSuchObject [REDACTED]: NameErr: DSID-0310028C, problem 2001 (NO_OBJECT), data 0, best match of:
        'DC=domain,DC=com'

I tried using ldaps, combining with flags such as -port, -force-ssl and I tested against many DCs (one of them 10.10.1.1)

Any idea whats going on??

Dreikana avatar Nov 27 '24 18:11 Dreikana

It might be that the DNS zone is a forest or legacy zone, which you can query with --print-zones. Alternatively it could be that this DNS zone is not AD integrated/managed.

dirkjanm avatar Nov 28 '24 10:11 dirkjanm

Thats the output using the flag --print-zones

python3 dnstool.py -u domain.com\\user -p 'password' --print-zones 10.10.1.1
[-] Connecting to host...
[-] Binding to host
[+] Bind OK

Dreikana avatar Nov 28 '24 20:11 Dreikana

Ran into this and I think it was related to an org using / switching to Azure managed DNS. Adding --legacy worked and successfully added a DNS record.

jdelta1 avatar Apr 25 '25 15:04 jdelta1

Saviour @jdelta1 thanks

Cyb3rC3lt avatar Sep 26 '25 14:09 Cyb3rC3lt