Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception: System.DirectoryServices.DirectoryServicesCOMException: The user name or password is incorrect. #9

Open
forensic65x opened this issue Dec 19, 2021 · 2 comments

Comments

@forensic65x
Copy link

nopac.exe scan -domain testlocal.net -user testlocaluser -pass 'testlocaluserPASS!'

Using a verified good password, triggers the following error:

Unhandled Exception: System.DirectoryServices.DirectoryServicesCOMException: The user name or password is incorrect.

at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
at noPac.Program.getDCs(String domain, String username, String password, String domainController)
at noPac.Program.scan(String domain, String username, String password, String passwordHash, String domainController)
at noPac.Program.Main(String[] args)

It kicks up a 'NoPac has stopped working' error as well..

While the executable did compile. It did show this recurring warning below.

------ Rebuild All started: Project: noPac, Configuration: Debug x64 ------
C:\github\noPac\noPac\lib\S4U.cs(300,29,300,36): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\S4U.cs(389,25,389,32): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\S4U.cs(558,21,558,28): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\S4U.cs(902,21,902,28): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\S4U.cs(947,17,947,24): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\Roast.cs(158,25,158,32): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\Roast.cs(687,49,687,53): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\Roast.cs(811,21,811,28): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\Renew.cs(160,25,160,32): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\Ask.cs(411,25,411,32): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\Ask.cs(634,21,634,28): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\ForgeTicket.cs(976,21,976,28): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\LSA.cs(554,21,554,28): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\LSA.cs(590,25,590,32): warning CS0162: Unreachable code detected
C:\github\noPac\noPac\lib\LSA.cs(1480,69,1480,76): warning CS0162: Unreachable code detected
noPac -> C:\github\noPac\noPac\bin\x64\Debug\noPac.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

@benybb
Copy link

benybb commented Dec 23, 2021

I have the same issue

@scottctaylor12
Copy link

Try using double quotes instead of single quotes when setting the password. That's what fixed it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants