mocyber / Range.AccountGen

GNU General Public License v3.0
2 stars 0 forks source link

Program fails to run #1

Open bndabbs opened 6 years ago

bndabbs commented 6 years ago

I am getting the following error when I try to run the executable:

=============== Range User Account Generation Tool ==================
\-------------------------------------------------------------------/

Unhandled Exception: System.DirectoryServices.AccountManagement.PrincipalOperationException: An operations error occurred.
 ---> System.DirectoryServices.DirectoryServicesCOMException: An operations error occurred.

   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
   at System.DirectoryServices.DirectoryEntry.Bind()
   at System.DirectoryServices.DirectoryEntry.get_SchemaEntry()
   at System.DirectoryServices.AccountManagement.ADStoreCtx.IsContainer(DirectoryEntry de)
   at System.DirectoryServices.AccountManagement.ADStoreCtx..ctor(DirectoryEntry ctxBase, Boolean ownCtxBase, String username, String password, ContextOptions options)
   at System.DirectoryServices.AccountManagement.PrincipalContext.CreateContextFromDirectoryEntry(DirectoryEntry entry)
   at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInit()
   --- End of inner exception stack trace ---
   at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInit()
   at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit()
   at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
   at System.DirectoryServices.AccountManagement.PrincipalContext.ContextForType(Type t)
   at System.DirectoryServices.AccountManagement.Principal.GetStoreCtxToUse()
   at System.DirectoryServices.AccountManagement.Principal.set_Description(String value)
   at Range.AccountGen.Program.Main(String[] args) in C:\projects\range-accountgen\Range.AccountGen\Program.cs:line 43
theturingnerd commented 6 years ago

Was this run from a machine joined to the target domain?

bndabbs commented 6 years ago

Yeah that was run on the domain controller

theturingnerd commented 6 years ago

What version DC, what schema, what options did you run with? I just ran it in my vagrant builds on 2012r2 no issue, so wanna dig into what it is specifically.