I have a query to fetch ad users based on modifytimestamp attribute.
string datetime = acc.ToUniversalTime().ToString("yyyyMMddHHmmss") + ".OZ";
"(&(objectClass=User)(objectCategory=User)
(userAccountControl:1.2.840.113556.1.4.803:=2)(modifyTimestamp<=" + datetime +
"))";
The above query generate the following error in Windows ...
string path = "LDAP://192.168.0.20/CN=users,DC=company,DC=ltm,DC=dom";
DirectoryEntry dir = new DirectoryEntry(path, admin, pass, AuthenticationTypes.ServerBind);
object value = dir.Properties["description"].Value;
dir.Properties["description"].Value = "test";
dir.CommitChanges();
The code generates a COMException : "Invalid DN synta...
Hello,
I want to search every computer known to LDAP and list all accounts on each computer which are Administrators.
I'm familiar with LDAP queries, I just don't know if this is possible, and if it is - what the syntax would be.
Thanks in advance,
Jim
...
I am writing the following methods to add and remove users from active directory in C#.
void AddUserToGroup(string userId, string groupName);
void RemoveUserFromGroup(string userId, string groupName);
How best to implement these methods?
Here is some code from CodeProject. I can't see where the AD server is specified in these example...
I have a User GUID. How could I get the Organizational Unit (OU) of this user?
...
Hi,
I am having trouble writing some Java code, which will create a container/folder in ADAM, where the container name and distinughed name contain a forward slash.
e.g.
cn=test/test
dn=CN=test/test,CN=TestStore,DC=MyCompany,DC=COM
LdapContext _ctx = getNewContext(valid_userName, valid_userName, valid_userName);
// uses Initi...
We have written an authentication provider for a SharePoint web application which can requests multiple LDAP directories.
One of the LDAP server have to be requested via SSL. So we imported the CA certificate which was used to sign the LDAP server's certificate into the certificate store of the SharePoint server.
The following code s...
I use the SpringSecurity-framework for authentication, and it works as long as there is a user with the same name in my local DB.
However, I want an admin-account that is only stored in the local DB and has no equivalent in LDAP.
So, how can I configure SpringSecurity so that it uses LDAP and if this fails looks for a user and password...
I need to know how many users and groups are in my LDAP directory. The search looks fairly simple:
(| (objectClass=group)(objectClass=user))
The problem is that the API is very limited. I can only get a NamingEnumeration<SearchResult> and it doesn't have a count. I didn't find any functions we can use, like the count in SQL.
Is th...
I'm trying to authenticate with a tomcat server through LDAP. Then after I'm authenticated send a basic GET request to get some data back (XML), and display it to the user. How would I go about authenticating with the server and then performing this request? Are there any good good guides or libraries for this? I'm pretty new with this p...
I'm working on a .NET application written in C# and WPF. In this application we will authenticate the users towards an Active Directory server. In the end we might want to support other LDAP implementations too, so if I can build this without being ActiveDirectory-specific that would be an advantage.
What's the best approach to get sta...
Hi, im suppose to try to replace some attribute value of LDAP data into NULL value, but I cant seem to get it to work using LDIF format.
I tried various format.. all seems to return me an error.
Here are those format:
dn: some..RDN
changeType: modify
replace: data
data:
or
dn: some..RDN
changeType: modify
replace: data
Can anyone...
I am playing with LDAP and Java search.
Here's my LDIF export with a simple organization
version: 1
dn: dc=example,dc=com
objectClass: organization
objectClass: dcObject
objectClass: top
dc: example
o: MyOrganization
description: Test Description
dn: ou=people, dc=example,dc=com
objectClass: organizationalUnit
objectClass: top
ou:...
Hey all,
I've got a Mac app written in Java. I'm trying to get the fully qualified domain name (LDAP) of the current user account from the system. The current user would be logged into the system through the active directory. An example of the string I am after would be:
domain\[email protected]
Any assistance would be...
I am adapting an existing web application based on Tomcat 5.5 to add user authentication using an LDAP server. I successfully modified the server.xml and web.xml files to authenticate users using basic authentication, however I want to create my own custom login page for users. I switched over to form authentication, using examples fro...
Hi again,
authentication via LDAP works like a charm, however, when I assign a role to a user and secure a page in the requestmap (like /books/show/** and ROLE_USER) this only works for local-only users, not for users authenticated via LDAP. (IS_AUTHENTICATED_FULLY works, though)
How can I fix that?
...
Hi
I work for a company with multiple public-facing web sites.
Some of these sites are built using third party products (Moveable Type, myBB, Trac and others). We also have a couple of bespoke sites built on the Microsoft stack.
Currently, we have no unified authentication/authorisation solution; each site implements its own user sto...
Hi,
I'm currently writing some software in C# which needs to connect to an AD server and get some user details. When I connect using the code below it works against most AD servers that I connect to but there are a couple where it fails with an error of "Logon failure: unknown user name or bad password.". The server name / credentials...
I have some java code which allows users to reset their passwords stored on a LDAP server. The code runs as part of a web application running on Glassfish.
The problem I'm seeing is that after calling the change password operation, the user can subsequently use either password to access the application.
I have a unit test which runs...
Can someone tell me the best way to export entries (user information, their groups and roles, etc) from 389 Directory Server so it can be best imported into a different LDAP server? Do these files follow some standard format? Is there a general best practice to doing this?
Thanks!
...