active-directory

Getting WILL_NOT_PERFORM error when trying to enable user via LDAP

百般思念 提交于 2020-01-03 17:12:23
问题 I'm trying to create a new Active Directory user via ldap, but the user is disabled on creation. I am trying to set the userAccountControl attribute to 512, but I am getting an error WILL_NOT_PERFORM. I've read this is because the password isn't being set, but I can't tell why. Creating the user with the userPassword attribute set is working fine. Here is the code: // Create a container set of attributes Attributes container = new BasicAttributes(); // Assign the properties we need to set on

Unlock and Reset Active Directory Password Coldfusion

风格不统一 提交于 2020-01-03 12:31:54
问题 I have created a drop down using CFLDAP. The drop down is the users name for which I will allow a password unlock and reset to occur. <div id="DESDD" class="form-group" style="display:none;"> <select name="DES" id="DES" class="form-control"> <option value="" selected>Please select user</option> <cfoutput query="CreateDESDropdown"> <option value="#samaccountname#">#cn#</option> </cfoutput> </select> </div> <div id="pass" class="form-group" style="display:none;"> <input type="password" name=

How to provide DirectoryEntry.Exists with credentials?

萝らか妹 提交于 2020-01-03 07:17:24
问题 This morning I discovered a nice method (DirectoryEntry.Exists), that should be able to check whether an Active Directory object exists on the server. So I tried with a simple: if (DirectoryEntry.Exists(path)) {} Of course it lacks any overloads to provide credentials with it. Because, if credentials are not provided I get this Exception: Logon failure: unknown user name or bad password. (System.DirectoryServices.DirectoryServicesCOMException) Is there any other option that gives me the

Enabling an Active Directory account using JNDI

北城以北 提交于 2020-01-03 04:49:11
问题 I have successfully created a disabled user in Active Directory via JNDI, but I am not sure how to enable it. Am I supposed to manipulate the userAccountControl attribute directly? Thanks. 回答1: You are right. Here are some values and the explanation how to use them : UF_TEMP_DUPLICATE_ACCOUNT 0x0100 UF_NORMAL_ACCOUNT 0x0200 UF_INTERDOMAIN_TRUST_ACCOUNT 0x0800 UF_WORKSTATION_TRUST_ACCOUNT 0x1000 UF_SERVER_TRUST_ACCOUNT 0x2000 UF_DONT_EXPIRE_PASSWD 0x10000 UF_SCRIPT 0x0001 UF_ACCOUNTDISABLE

.GetDirectoryEntry throws COM exception, code:0x800720720 when attempting to bind to object

亡梦爱人 提交于 2020-01-03 03:46:13
问题 My application is running on IIS 7.0, it is supposed to impersonate the authenticated user and unlock or reset other user accounts. It worked fine when I was developing it on my workstation, but when I uploaded it to the server the impersonation stopped working, it won't bind to the AD objects and keeps throwing the same exception. I had the same problem earlier with using PrincipalContext but I was able to get around that using using(HostingEnvironment.Impersonate()) because I didn't need

I have an ldap connection on my RoR app but now how do I check users on login?

て烟熏妆下的殇ゞ 提交于 2020-01-03 02:20:08
问题 I'm developing an Ruby on Rails webapp and I'm trying to use LDAP authentication to authenticate my users, I have the connection set up and working to the LDAP , but now I can't find any examples or documentation online on how to write code to authenticate users against my LDAP on Ruby on Rails I'm using: Ruby v2.2 and Rails v5.0.3 and the gem I'm using to connect to ldap is gem 'net-ldap', '~> 0.16.0' This is my login form at the moment, authenticating with a sqlserver DB , but I want it to

System.__ComObject instead of active directory values

我的未来我决定 提交于 2020-01-03 01:35:14
问题 I tried to fetch LDAP user information using asp . But I get System.__ComObject instead of active directory values. Please help me to solve this . CODE I'm getting System.__ComObject instead of active directory values . Please help me to solve this error . 来源: https://stackoverflow.com/questions/56021248/system-comobject-instead-of-active-directory-values

Error 2147463168 when trying to bind to an AD User Object

£可爱£侵袭症+ 提交于 2020-01-02 12:26:38
问题 I'm working on a Windows 2012 (NOT R2 and can't upgrade) AD environment. When I run the following piece of code from vbscript with an admin (not administrator) account, it runs perfectly. However when I run it with a normal user, I get a -2147463168 which seems to be a binding error. On error Resume next UsuariosLDAP = "LDAP://" & objSysInfo.UserNameSet ObjUser = GetObject(UsuariosLDAP) If err.number <> 0 then strTipoError = "Error buscando objeto en LDAP " & CStr(Err.Number) & " Usuario:" &

using openquery to connection to Active directory

倾然丶 夕夏残阳落幕 提交于 2020-01-02 10:58:52
问题 I have the following code to connect to my active directory and then pull users in a certain group. As the code is below it works fine, however I have to hard code the department I want to look in. I am trying to pass a parameter to the openqueries second parameter (second code) but I keep getting an error, I know its a problem with my quotation marks, any help would be greatly appreciated thanks, select * from openquery(ADSI, ' select givenName, sn, sAMAccountName, displayName, mail,

Access to azure hosted API App denied by CORS policy

℡╲_俬逩灬. 提交于 2020-01-02 10:07:58
问题 We are a team working on azure web services. What we want to achieve is having a JavaScript frontend which can communicate with our Java API App hosted in Azure. We are using Active Directory for Authentication. And we have configured CORS within the Azure portal. We have created a Java backend with Swagger Editor as it is described in this article. We have just advanced this example to support our own data model. So also the ApiOriginFilter class is still unchanged: @javax.annotation