VS 2008 Active Directory Domain/User/Password Validation Over VPN

Aug 18, 2011

I have a piece of business-soft to make the lives of our employees easier. It's fairly typical, a tabbed-MDI style main form with a load of buttons that activate each of its sub-modules.

I have security set up on it so that someone in sales can't enter the module for purchasing, etc... I authenticate the user by having them type in their network password and check it against the AD server with this function:

'Remember to Imports System.DirectoryServices for this to work
Private Function ValidateActiveDirectoryLogin(ByVal Domain As String, ByVal Username As String, ByVal Password As String) As Boolean

[Code].....

View 22 Replies


ADVERTISEMENT

Adding Active Directory Sub Domain User To Main Domain Group?

Sep 22, 2010

I have a function that works perfectly when I attempt to add a user from the same domain into a group of the same domain.

Function AddUserToGroup(ByVal strUserDN As String, ByVal strGroupDN As String, ByVal strGRPDC As String, ByVal strUserDC As String) As Boolean
Dim oUser As DirectoryEntry

[Code]....

The error is actually being thrown on the Invoke line, but as I said earlier, if the user is in the same domain, this works perfectly.

View 1 Replies

Change Password Of A Active Directory User?

Aug 17, 2010

How to change the password of a Active Directory by using VB.net CodeSHYAM

View 3 Replies

Authenticate An Active Directory User With An Expired Password?

Apr 7, 2011

I have a web form that uses AD to authenticate users. I want to be able to authenticate users with expired password, and redirect them to the password change page after authentication.

if for instance, a site admin reset a users password, I use the method below, to make the user reset their password on next logon.

Public Shared Sub ForceUserToResetPassword(ByVal LDAP_URI As String, ByVal UserName As String, ByVal Auth_UserName As String, ByVal Auth_Password As String)
Dim LDAPEntry As DirectoryEntry = Nothing
Try

[Code]...

View 3 Replies

Possible To Authenticate An Active Directory User With An Expired Password?

Apr 7, 2011

I have a web form that uses AD to authenticate users. I want to be able to authenticate users with expired password, and redirect them to the password change page after authentication. if for instance, a site admin reset a users password, I use the method below, to make the user reset their password on next logon.[code]

View 1 Replies

Validate Domain Name In Active Directory?

Jul 13, 2010

Is there any way we can verify if a particular domain exists in Active Directory?. I mean, I have an app where admin users can add new domain values in a text box. Before saving the info, I would like to check whether such domain exists in AD.

View 3 Replies

Find Domain Users Name In Active Directory?

May 16, 2012

i am using following code to retive Domain Users from AD

but i am getting APPUser and IUSER in the give

how to avoide this type of user from the list i wantreal user names only

Dim pctx As New PrincipalContext(ContextType.Domain, "192.1.1.1", "myusername", "mypwd")
Dim grp As GroupPrincipal = GroupPrincipal.FindByIdentity(pctx,

[Code]....

View 5 Replies

Set Password For Active Directory Lightweight Directory Services (ad Lds) On .net 2.0?

Apr 18, 2011

I am trying to create a new user and set their password in AD LDS using asp.net vb. I'm binding to an instance of a directory entry, which is working fine. And I can add a user without a problem. The problem is that I can't seem to set the password when I add the user.Is this the right way to set the password

View 3 Replies

How To Set Password For Active Directory

Mar 10, 2011

I am trying to create a new user and set their password in AD LDS using asp.net vb. I'm binding to an instance of a directory entry, which is working fine. And I can add a user without a problem. The problem is that I can't seem to set the password when I add the user. Is this the right way to set the password?

Dim objADAM As DirectoryEntry = BindToInstance()
Dim objUser As DirectoryEntry = objADAM.Children.Add("CN=Jimmy", "User")
objUser.Properties("sn").Value = "lloyd"
objUser.Properties("givenName").Value = "Jimmy Smith"
objUser.Properties("userpassword").Value = "THEPASSWORD"
objUser.CommitChanges()

This is the error that I get :
System.DirectoryServices.DirectoryServicesCOMException (0x80072020): An operations error occurred. (Exception from HRESULT: 0x80072020) at System.DirectoryServices.DirectoryEntry.CommitChanges

View 1 Replies

VS 2008 Read Distinguished Name Of Current User From Active Directory

Aug 31, 2010

I need to read the distinguished name of the current user (the one running the program) from Active Directory.I'm warm (I know I should use System. DirectoryServices and DirectorySearcher), but somehow I can't get the code to work properly, nor can I find a working example.Now, after having spent hours searching for examples on the internet, I'm getting quite frustrated with myself, so I turn to you hoping someone can provide an example.Why I need this: when people run this program, it needs to detect which OU they belong to. We have several sites (for example Rotterdam and Amsterdam) and depending on what site the user's OU is, I need to perform some actions. So I hope to derive f.e. "OU=Rotterdam" from their DN.

View 3 Replies

Reset Password Active Directory?

Sep 10, 2009

I'm working on an console application that resets an user password in active directory. I using an administrator account and the following code:

deUser = New DirectoryEntry(strPath, _admlogin, _admpwd, AuthenticationTypes.Secure)
Dim oPassword As Object() = New Object() {"123newpass"}

[Code].....

View 3 Replies

Asp.net - Active Directory - Check If Password Never Expires?

Aug 30, 2011

Is there a way in Visual Basic to check if the user's password is set to never expire in Active Directory? 've found a way to find the last date it was changed, but I can't find the other available options.

[Code]....

Where can I find a list of all available objUser properties?

View 4 Replies

Forgot Active Directory Password - Reset Using LDAP

Apr 21, 2011

I'm working on a web based "Forgot Password" to reset AD passwords, using LDAP. Well, I can unlock the user, but not change the password.

Here is my function :
Private Function ChangeLocalUserPassword(ByVal User As String, ByVal Pass As String) As Boolean
Dim pinger As New Net.NetworkInformation.Ping
Dim usr As DirectoryEntry
_de = GetDirectoryEntry()
If _de Is Nothing Then
[Code] .....

How I can get around hard coding the Admin user on the page? Would creating an IUSR with a few Admin privileges work?

View 3 Replies

Update Active Directory Without Hardcoding Username/password

Jan 20, 2011

Currently, users log into a web application with their AD (active directory) credentials which are validated against the AD. Once inside the application, certain users will need to update the AD. When I hardcode a username/password, I am able to update the AD, however when I try to force the object to use the logon credentials or if I don't specify the username/password, it throws an error. Obviously due to security concerns, I do not want to hardcode credentials.

Error - System.DirectoryServices.DirectoryServicesCOMException: An operations error occurred.

Public Shared Sub SetProperty(ByVal de As DirectoryEntry, ByVal propName As String, ByVal propValue As String)
If Not propValue Is Nothing Then

[Code].....

View 1 Replies

Reseting A Users Password Via Active Directory Using Visual Basic 2010?

Jan 4, 2010

im writing a little app to enable authorised staff to reset student passwords but having a few issues. . I am no expert and am now stuck The following code does not seem to error but also does not reset the password! Private Sub bt_pwd_reset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_pwd_reset.Click

[Code]...

View 1 Replies

Active Directory - ID For Each User?

Feb 15, 2007

I would like to have all properties on a user from active directory. I find some property name as :
distinguishedName, SAMAccountName, sn, givenName, TelephoneNumber, mail
If you have a list of property? As each user has an ID in AD ?

View 5 Replies

Change Domain Password In VB 2008?

Apr 25, 2010

I am trying work on a Form in VB 2008 that allow our Windows users change their domain account password. My code below

Dim dcDNS
As
String =
"Vietnamohio"

[Code]...

View 6 Replies

.net 2.0 - Remove User From Active Directory

Aug 6, 2010

I am trying to create a VB.NET application which will (hopefully) reduce some time spent on some of my departments helpdesk calls. The part that I am stuck with is how to use VB.NET to remove a user from a group. The following is code that I have been playing with:

[Code]....

I am coding in .NET 2.0 as I am unsure if the server it will live on will have 3.5 installed.

View 1 Replies

Adding User To Active Directory?

Apr 27, 2012

I am trying to add user to a Active Directory group which i already have access to but i am getting an error "Unspecified Error" Ca you guys please take a look at my code and let me know what i am doing worng?

Public Sub adUserToGroup()
Dim Buf As String = ""
Dim sDomainName As String = ("LDAP:servername.cfe.kineeg.com")

[code].....

View 1 Replies

Enable Active Directory User?

Aug 17, 2010

How to enable a Active Directory User Account By using vb.net CodeSHYAM

View 7 Replies

Get User Active Directory Details?

Feb 15, 2011

I am building a simple intranet site and I want to get the user's Active Directory.What steps do I need to take on the IIS side for this to work?Are any changes required to my web config? detailed explanation, as this is giving me a hard time.I have tryed things like this

Request.LogonUserIdentity.Name.ToString
also
HttpContext.Current.User.Identity.Name

View 1 Replies

Get Query Active Directory With The Pc Name And Return It's Path In The Active Directory Tree

May 9, 2006

I'm a developer for a College we have an active directory.I need to query Active Directory with the Pc name and return it's path in the Active Directory tree.

View 3 Replies

Active Directory Moving User Accounts To A Different OU

Sep 1, 2011

I am a programmer for 6 years with VB6, now I am using VB 10 Express and working with Active Directory for the first time. I have been able to make a lot of things work with AD.I have been trying time and again to make this work. I have been googling and trying samples and keep running into one error after another, the latest is a [code] "There is no such object on the server."[code] My objective for this is to move the user account from the office OU to the Disabled OU. I have been fighting this for so long that I am going crosseyed.[code]

View 1 Replies

Active Directory User Group Membership?

Jul 14, 2009

Active Directory User Group Membership

View 4 Replies

Active Directory User Properties Updates?

Jul 22, 2011

I wrote a sub that would update an Active Directory user's phone numbers using the lines below:

SetProperty(dirEntryResults, "telephoneNumber", strPhoneNumber)
SetProperty(dirEntryResults, "mobile", strPhoneMobileNumber)

The telephone number updates successfully but the mobile number never updates although the strPhoneMobileNumber variable has a valid phone number value. The code executes without any errors. What do I need to do to change the mobile number?

Sub UpdateUserAcct(ByVal userLogin As String, ByVal strPhoneNumber As String, ByVal strPhoneMobileNumber as String)
Dim dirUser As DirectoryEntry = GetDirectoryEntry()
Dim dirUserSearcher As DirectorySearcher = New DirectorySearcher(dirUser)

[code]....

View 6 Replies

Add User In Active Directory Around 30 Characters In Length?

Dec 16, 2011

I am using windows 2008 R2 Server and trying to Add a user in active directory .

I am able to save user ID of length less than 20 Characters.But when I am trying to increase this value to 30 characters then I am getting the error.

"System.DirectoryServices.DirectoryServicesCOMException (0x8007001F): A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)"

This error when I searched on net give me various links saying that:

(a)verify if the issue is caused by the length of sAMAccountName

(b)The document of SAM-Account-Name also indicates that the length of it should be less than 20 characters.

I am using the code below to add user in Active Directory

public static void AddUser(ADUser adUser)
{
if (_logger.IsDebugEnabled)

[Code]....

View 3 Replies

ASP.Net (IIS 7.5) Querying Active Directory Without User Credentials?

Dec 20, 2011

I have multiple web applications that I've built for our intranet. I wanted to allow users to not worry about logging in, so these apps pull the currently logged on user when they hit the site. I used this code for this to happen:

Dim userName As String = User.Identity.Name
CurrentUser = userName.Substring(userName.IndexOf("") + 1)

This works like a charm, no issues here. The next step is to query Active Directory for that logged in user to pull various information. How I currently have it coded, it works like a charm on the devleopment side (typical because I'm not running IIS).The problem becomes when I publish it to my IIS server (Windows Server 2008 R2 running IIS 7.5), I get error messages that point to the specific line in my code that queries Active Directory. The interesting part is these apps were working great last week. They broke after my server admin did the latest batch of Windows Updates (please note, I am running them using .Net Framework 4.0)Before I had each app setup so that Windows Authentication was Enabled, the other Authentication types were disabled. For providers, Negotiate is #1, NTLM is #2. For Advanced Settings, Extended Protection = Off, and Enable Kernel-mode authentication is checked.

[code]...

In doing this I also removed the string that was higher up in my web.config section. This did not work either (fyi, this was a great reference[url]I then tripped across this article: [url] which seemed to be a similar situation. This article eventually referenced "Double Hops", after looking into this and trying a few things, this didn't solve my issue either.Next StepI am going to try a new IIS 7.5 implementation on a different Server 2008 R2 system and essentially start from scratch, to see if the problem recreates or not.

View 2 Replies

Check User Group In Active Directory?

Oct 6, 2009

Check the User is the Member of One Group using Active Directory in C#.net[code]..

View 1 Replies

Copy Active Directory User From Template?

Sep 12, 2011

I am trying to create a VB.NET application that allows a user to copy an Active Directory user or template in order to create a new Active Directory user. Currently a user right clicks on a template and chooses Copy, then enters info for new user.user is then created just like the template user. How can I perform these operations using the VB.NET framework and Active Directory or Account Management DLL's?

View 4 Replies

Remove User Object From Active Directory?

Jul 6, 2010

I've been searching and trying out code all day.Nothing errors on this code but it doesn't delete any user accounts.[code]...

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved