I'm trying to perform some basic AD User managment tasks in C# using .Net 3.5
I've got a System.DirectoryServices.AccountManagement.UserPrincipal object that contains the user details.
I can call user.ExpirePasswordNow() and the user will be forced to changed their password at next login (and the "Active Directory Users and Computers" ...
Has anyone successfully used the System.Net.HTTPWebRequest with Active Directory authentication in a DotNetNuke website? I have looked around and found several references to HTTPWebRequest and Active Directory authentication, but none seem to have the special sauce. I have tried uncountable variations of the attributes/methods, without s...
I am trying to retrieve an object attribute in Active Directory that appears to be a multi-valued string (See canonicalName). After performing a search:
var conn;
conn.Open = 'Provider=ADsDSOObject;';
var command = '<LDAP://CN=Partitions,CN=Configuration,DC=domain,DC=com>;(&(objectcategory=crossRef)(systemFlags=3));name,nETBIOSName,nCN...
I am trying to add a user to Active Directory through an MPS Web Service. I've been trying a long time to find the correct LDAP-url to use to tell it to add the new user to the Users group. I've tried things like:
LDAP://XXXX.YYY/OU=Users,DC=XXXX,DC=YYY
LDAP://XXXX.YYY/CN=Users,DC=XXXX,DC=YYY
LDAP://XXXX.YYY/DN=Users,DC=XXXX,DC=YYY
...
Hi,
I'm currnetly trying to set the four properties:
"Password never expires"
"Account is disabled"
"User must change password at next logon"
"User cannot change password"
I can set the first two using the lines in C#:
deUser.Properties["userAccountControl"].Value = val | 0x10000;
deUser.Properties["userAccountControl"].Value = val |...
Hi guys,
with help from two people on stackoverflow I've figured out how to set the "user cannot change password" using the code below. I'm now trying to figure out how to remove the property. I thought setting the denied flag to "allow" would work but it seems to do nothing. I would like the code to be using DirectoryEntry and not Prin...
I have two queries that retrieve all groups and all users in a domain, Mydomain
--; Get all groups in domain MyDomain
select *
from OpenQuery(ADSI, '
SELECT samaccountname,mail,sn,name, cn, objectCategory
FROM ''LDAP://Mydomain/CN=users,DC=Mydomain,DC=com''
WHERE objectCategory=''group''
ORDER BY cn
')
--; Get all users in dom...
Hello, I'd like to authorize users to perform specific actions within my controllers. I've found the ASP.NET tutorial which explains how to allow individual users to perform specific actions but can this be extended to security groups? For example, would everyone belonging to the "domain\group" security group have access to the GetSec...
Hi,
I need to use Form-Based authentication on an ASP.NET MVC web site with LDAP (Active Directory) backend like TeamCity for instance.
So i need to query LDAP first if the requested user is valid, then auto-register user in database according to LDAP user authentication infos in order to use mixed authentication :
Users :
Admin (loc...
I am trying to create scripts/services that allow for waking PCs in a windows domain via WOL. Now i want to give the user the option to select an AD container as a starting point for the waking of PCs contained within. My initial thought is using DHCP as a repository to query for MAC addresses given the hostnames (which i can easily enou...
How can I retrieve all users from Active Directory using VBScript?
...
I was building an Active Directory Single Sign-On authentication system for Java web applications (using SPNEGO/Kerberos), and everything works fine with either Firefox or (reportedly) Safari, but Internet Explorer causes an exception:
GSSException: Channel binding mismatch (Mechanism level: ChannelBinding not provided!)
In fact, I th...
Is this possible? Code sample would be nice.
Thanks
...
Several fields in MOSS profiles are mapped to fields in active directory and we have given the user the ability to modify these.
But when the incremental profile import runs it overwrites these with the old values from active directory.
How do we make it so that AD is updated with the new values from the profile?
Thanks for any sugges...
I recently refactored some code in an Active Directory role provider to remove support for multiple domains. In the process my integration tests broke in ways that I didn't expect. The tests do not reliably succeed unless I put significant delays between the test set up code and the code that invoked the method being tested. If I run ...
I have a Windows Domain here that runs Exchange 2007, and I need to programmatically create new Mailing Lists.
From what I could gather so far, Exchange mailing lists are just normal AD Groups, so I mainly have to worry about the interaction with AD. I used the System.DirectoryService namespace to query AD, but I'm not sure what the cor...
I'm trying to set up SVN to authenticate against an ActiveDirectory. I know this is possible if you set up SVN to be served using Apache, but doing so introduces too much overhead, and SVN runs too slow. From reading the SVN docs, it sounds like it should now be possible (since SASL was integrated into SVN in 1.5) to configure SVN to a...
Hi,
I have the DN of a user in Active Directory, I want to get the "NT style" domain\user from this. The sAMAccountname AD property gives me the user part, but what about the domain?
Thanks
...
Hello,
I have a principal with credentials to login to an ADAM, creating a successful DirectoryEntry object with:
DirectoryEntry entry = new DirectoryEntry("
LDAP://site.com:10001/
CN=MyPrincipal,OU=Users,DC=site,DC=com", "MyUserName", "MyPassWord");
However, what i need to do is to authenticate users logging in. The problem is tha...
I have a COM object written in Delphi, which uses Active Directory Services to return the current logged on user. This is the code I use :
var
SysInfo : IADsWinNTSystemInfo;
begin
SysInfo := CoWinNTSystemInfo.Create;
Result := SysInfo.DomainName + '/' + SysInfo.UserName;
end;
CoWinNTSystemInfo is just a wrapper around Active...